asio 0.1.5 | Main Page | Class Index | Member Index | Tutorial |
Public Types | |
enum | code_type { access_denied = ASIO_SOCKET_ERROR(EACCES), address_family_not_supported = ASIO_SOCKET_ERROR(EAFNOSUPPORT), address_in_use = ASIO_SOCKET_ERROR(EADDRINUSE), already_connected = ASIO_SOCKET_ERROR(EISCONN), already_started = ASIO_SOCKET_ERROR(EALREADY), connection_refused = ASIO_SOCKET_ERROR(ECONNREFUSED), connection_reset = ASIO_SOCKET_ERROR(ECONNRESET), bad_descriptor = ASIO_SOCKET_ERROR(EBADF), fault = ASIO_SOCKET_ERROR(EFAULT), host_not_found = ASIO_SOCKET_ERROR(HOST_NOT_FOUND), host_not_found_try_again = ASIO_SOCKET_ERROR(TRY_AGAIN), host_unreachable = ASIO_SOCKET_ERROR(EHOSTUNREACH), in_progress = ASIO_SOCKET_ERROR(EINPROGRESS), interrupted = ASIO_SOCKET_ERROR(EINTR), invalid_argument = ASIO_SOCKET_ERROR(EINVAL), message_size = ASIO_SOCKET_ERROR(EMSGSIZE), network_down = ASIO_SOCKET_ERROR(ENETDOWN), network_reset = ASIO_SOCKET_ERROR(ENETRESET), network_unreachable = ASIO_SOCKET_ERROR(ENETUNREACH), no_descriptors = ASIO_SOCKET_ERROR(EMFILE), no_buffer_space = ASIO_SOCKET_ERROR(ENOBUFS), no_host_data = ASIO_SOCKET_ERROR(NO_DATA), no_memory = ENOMEM, no_permission = EPERM, no_protocol_option = ASIO_SOCKET_ERROR(ENOPROTOOPT), no_recovery = ASIO_SOCKET_ERROR(NO_RECOVERY), not_connected = ASIO_SOCKET_ERROR(ENOTCONN), not_socket = ASIO_SOCKET_ERROR(ENOTSOCK), not_supported = ASIO_SOCKET_ERROR(EOPNOTSUPP), operation_aborted = ECANCELED, shut_down = ASIO_SOCKET_ERROR(ESHUTDOWN), success = 0, timed_out = ASIO_SOCKET_ERROR(ETIMEDOUT), try_again = EAGAIN, would_block = ASIO_SOCKET_ERROR(EWOULDBLOCK) } |
Error codes. More... | |
Public Member Functions | |
socket_error () | |
Default constructor. | |
socket_error (int code) | |
Construct with a specific error code. | |
int | code () const |
Get the code associated with the error. | |
std::string | message () const |
Get the message associated with the error. | |
operator void * () const | |
Operator returns non-null if there is a non-success error code. | |
bool | operator! () const |
Operator to test if the error represents success. | |
Friends | |
bool | operator== (const socket_error &e1, const socket_error &e2) |
Equality operator to compare two error objects. | |
bool | operator!= (const socket_error &e1, const socket_error &e2) |
Inequality operator to compare two error objects. | |
std::ostream & | operator<< (std::ostream &os, const socket_error &e) |
Write an error message to an output stream. |
|
|
Default constructor.
|
|
Construct with a specific error code.
|
|
Get the code associated with the error.
|
|
Get the message associated with the error.
|
|
Operator returns non-null if there is a non-success error code.
|
|
Operator to test if the error represents success.
|
|
Equality operator to compare two error objects.
|
|
Inequality operator to compare two error objects.
|
|
Write an error message to an output stream.
|