Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
Loading...
Searching...
No Matches
binance::common::WebsocketNetworkError Class Reference

DNS, TCP, proxy or TLS failure. More...

#include <errors.hpp>

Inheritance diagram for binance::common::WebsocketNetworkError:
binance::common::WebsocketError binance::common::Error

Public Member Functions

 WebsocketNetworkError (const std::string &msg, bool request_sent=false, boost::system::error_code transport_error={})
boost::system::error_code transport_error () const noexcept
 The transport-level cause (e.g.
Public Member Functions inherited from binance::common::WebsocketError
 WebsocketError (const std::string &what, bool request_sent=false)
 WebsocketError (const std::string &what, std::string msg, std::optional< std::int64_t > code, bool request_sent)
bool request_sent () const noexcept
 True when the request was handed to the connection, so Binance may have executed it and the outcome is unknown.
Public Member Functions inherited from binance::common::Error
 Error (const std::string &what, std::string msg, std::optional< std::int64_t > code=std::nullopt)
const std::string & msg () const noexcept
std::optional< std::int64_t > code () const noexcept

Detailed Description

DNS, TCP, proxy or TLS failure.

Constructor & Destructor Documentation

◆ WebsocketNetworkError()

binance::common::WebsocketNetworkError::WebsocketNetworkError ( const std::string & msg,
bool request_sent = false,
boost::system::error_code transport_error = {} )
explicit

Member Function Documentation

◆ transport_error()

boost::system::error_code binance::common::WebsocketNetworkError::transport_error ( ) const
inlinenodiscardnoexcept

The transport-level cause (e.g.

boost::asio::error::connection_refused), or an empty error code when there is none.