|
C++ Actor Framework 0.19
|
An internal endpoint for sending or receiving data. More...
#include <socket.hpp>
Public Member Functions | |
| constexpr | socket (socket_id id) noexcept |
| constexpr | socket (const socket &other) noexcept=default |
| socket & | operator= (const socket &other) noexcept=default |
| constexpr signed_socket_id | compare (socket other) const noexcept |
| constexpr | operator bool () const noexcept |
| constexpr bool | operator! () const noexcept |
| constexpr socket | fd () const noexcept |
Public Attributes | |
| socket_id | id |
Related Functions | |
(Note that these are not member functions.) | |
| using | socket_id = int |
| Platform-specific representation of a socket. | |
| using | signed_socket_id = std::make_signed< socket_id >::type |
Signed counterpart of socket_id. | |
| template<class Inspector > | |
| bool | inspect (Inspector &f, socket &x) |
| void CAF_NET_EXPORT | close (socket x) |
Closes socket x. | |
| std::errc CAF_NET_EXPORT | last_socket_error () |
| Returns the last socket error in this thread as an integer. | |
| bool CAF_NET_EXPORT | last_socket_error_is_temporary () |
Checks whether last_socket_error() would return an error code that indicates a temporary error. | |
| std::string CAF_NET_EXPORT | last_socket_error_as_string () |
| Returns the last socket error as human-readable string. | |
| bool CAF_NET_EXPORT | probe (socket x) |
Queries whether x is a valid and connected socket by reading the socket option SO_ERROR. | |
| error CAF_NET_EXPORT | child_process_inherit (socket x, bool new_value) |
Sets x to be inherited by child processes if new_value == true or not if new_value == false. | |
| error CAF_NET_EXPORT | nonblocking (socket x, bool new_value) |
Enables or disables nonblocking I/O on x. | |
| error CAF_NET_EXPORT | shutdown_read (socket x) |
| Disallows further reads from the socket. | |
| error CAF_NET_EXPORT | shutdown_write (socket x) |
| Disallows further writes to the socket. | |
An internal endpoint for sending or receiving data.
Can be either a ::network_socket, ::pipe_socket, ::stream_socket, or ::datagram_socket.
Sets x to be inherited by child processes if new_value == true or not if new_value == false.
Not implemented on Windows.
|
related |
Checks whether last_socket_error() would return an error code that indicates a temporary error.
true if last_socket_error() returned either std::errc::operation_would_block or std::errc::resource_unavailable_try_again, false otherwise.
|
related |
Queries whether x is a valid and connected socket by reading the socket option SO_ERROR.
Sets the last socket error in case the socket entered an error state.
true if no error is pending on x, false otherwise.