Contains translator native API.
Protected Methods | |
static int32_t | address_family_to_native (int32_t address_family) |
Gets the native address family value corresponding to xtd address family. | |
static int32_t | native_to_address_family (int32_t address_family) |
Gets the xtd address family value corresponding to native address family. | |
static intmax_t | accept (intmax_t handle, std::vector< uint8_t > &socket_address) |
Accepts a connection on a socket. | |
static int32_t | bind (intmax_t handle, const std::vector< uint8_t > &socket_address) |
Binds a name to a socket. | |
static void | cleanup () |
Cleanup the socket library. | |
static int32_t | connect (intmax_t handle, const std::vector< uint8_t > &socket_address) |
Initiates a connection on a socket. | |
static intmax_t | create (int32_t address_family, int32_t socket_type, int32_t protocol_type) |
Creates an endpoint for communication. | |
static int32_t | destroy (intmax_t handle) |
Destroys the socket. | |
static size_t | get_available (intmax_t handle) |
Gets the amount of data that has been received from the network and is available to be read. | |
static int32_t | get_last_error () |
Gets last error. | |
static bool | get_os_supports_ip_v4 () noexcept |
Indicates whether the underlying operating system and network adaptors support Internet Protocol version 4 (IPv4). | |
static bool | get_os_supports_ip_v6 () noexcept |
Indicates whether the underlying operating system and network adaptors support Internet Protocol version 6 (IPv6). | |
static int32_t | get_raw_socket_option (intmax_t handle, int32_t socket_option_level, int32_t socket_option_name, intmax_t option, size_t &option_length) |
Gets options on socket. | |
static int32_t | get_socket_option (intmax_t handle, int32_t socket_option_level, int32_t socket_option_name, intmax_t option, size_t &option_length) |
Gets options on socket. | |
static int32_t | get_socket_linger_option (intmax_t handle, bool &enabled, uint32_t &linger_time) |
Gets linger option on socket. | |
static int32_t | get_socket_multicast_option (intmax_t handle, int32_t socket_option_name, uint32_t &multicast_address, uint32_t &interface_index) |
Gets multicast option on socket. | |
static int32_t | get_socket_ip_v6_multicast_option (intmax_t handle, int32_t socket_option_name, std::vector< uint8_t > &multicast_address, uint32_t &interface_index) |
Gets IP v6 multicast option on socket. | |
static int32_t | io_control (intmax_t handle, int32_t io_control, std::vector< uint8_t > &option_in_value, std::vector< uint8_t > &option_out_value) |
Sets low-level operating modes for the Socket using the IOControlCode enumeration to specify control codes. | |
static int32_t | listen (intmax_t handle, size_t backlog) |
Listens for connections on a socket. | |
static int32_t | poll (intmax_t handle, int32_t microseconds, int32_t mode) |
Synchronous I/O multiplexing. | |
static int32_t | receive (intmax_t handle, std::vector< uint8_t > &buffer, size_t offset, size_t size, int32_t flags) |
Receives a message from a socket. | |
static int32_t | receive_from (intmax_t handle, std::vector< uint8_t > &buffer, size_t offset, size_t size, int32_t flags, std::vector< uint8_t > &socket_address) |
Receives a message from a socket. | |
static int32_t | select (std::vector< intmax_t > &check_read, std::vector< intmax_t > &check_write, std::vector< intmax_t > &check_error, int32_t microseconds) |
Determines the status of one or more sockets. | |
static int32_t | send (intmax_t handle, const std::vector< uint8_t > &buffer, size_t offset, size_t size, int32_t flags) |
send a message from a socket. | |
static int32_t | send_to (intmax_t handle, const std::vector< uint8_t > &buffer, size_t offset, size_t size, int32_t flags, const std::vector< uint8_t > &socket_address) |
send a message from a socket. | |
static int32_t | set_blocking (intmax_t handle, bool blocking) |
Sets a value that indicates whether the socket is in blocking mode. | |
static int32_t | set_raw_socket_option (intmax_t handle, int32_t socket_option_level, int32_t socket_option_name, intmax_t option, size_t option_length) |
Sets options on socket. | |
static int32_t | set_socket_option (intmax_t handle, int32_t socket_option_level, int32_t socket_option_name, intmax_t option, size_t option_length) |
Sets options on socket. | |
static int32_t | set_socket_linger_option (intmax_t handle, bool enabled, uint32_t linger_time) |
Sets linger option on socket. | |
static int32_t | set_socket_multicast_option (intmax_t handle, int32_t socket_option_name, uint32_t multicast_address, uint32_t interface_index) |
Sets multicast option on socket. | |
static int32_t | set_socket_ip_v6_multicast_option (intmax_t handle, int32_t socket_option_name, const std::vector< uint8_t > &multicast_address, uint32_t interface_index) |
Sets IP v6 multicast option on socket. | |
static int32_t | shutdown (intmax_t handle, int32_t how) |
Shut down part of a full-duplex connection. | |
static void | startup () |
Startup the socket library. | |
|
staticprotected |
Gets the native address family value corresponding to xtd address family.
|
staticprotected |
Gets the xtd address family value corresponding to native address family.
|
staticprotected |
Accepts a connection on a socket.
handle | The socket handle. |
socket_address | A byte array socket address is a result parameter that is filled in with the address of the connecting entity, as known to the communications layer. |
|
staticprotected |
Binds a name to a socket.
handle | The socket handle. |
socket_address | A byte array socket address to bind. |
|
staticprotected |
Cleanup the socket library.
|
staticprotected |
Initiates a connection on a socket.
handle | The socket handle. |
socket_address | A byte array socket address to connect. |
|
staticprotected |
Creates an endpoint for communication.
address_family | One of address family values (see address_family_constants.h). |
socket_type | One of socket type values (see socket_type_constants.h). |
protocol_type | One of protocol type values (see protocol_type_constants.h). |
|
staticprotected |
Destroys the socket.
handle | The socket handle. |
|
staticprotected |
Gets the amount of data that has been received from the network and is available to be read.
handle | The socket handle. |
|
staticprotected |
Gets last error.
|
staticprotectednoexcept |
Indicates whether the underlying operating system and network adaptors support Internet Protocol version 4 (IPv4).
|
staticprotectednoexcept |
Indicates whether the underlying operating system and network adaptors support Internet Protocol version 6 (IPv6).
|
staticprotected |
Gets options on socket.
handle | The socket handle. |
socket_option_level | The platform-defined option level. |
socket_option_name | The platform-defined option name. |
option | The option is a result parameter of that is filled with the option value. |
option_length | The option size will contains the size of option value. |
|
staticprotected |
Gets options on socket.
handle | The socket handle. |
socket_option_level | One of socket option level values (see socket_option_level_constants.h). |
socket_option_name | One of socket option name values (see socket_option_name_constants.h). |
option | The option is a result parameter of that is filled with the option value. |
option_length | The option size will contains the size of option value. |
|
staticprotected |
Gets linger option on socket.
handle | The socket handle. |
enabled | Indicates whether to linger after the socket is closed.. |
linger_time | The amount of time to remain connected after calling the socket close method if data remains to be sent. |
|
staticprotected |
Gets multicast option on socket.
handle | The socket handle. |
socket_option_name | One of socket option name values (see socket_option_name_constants.h). |
multicast_address | The local IP address associated with a multicast group. |
interface_index | The interface index that is associated with a multicast group. |
|
staticprotected |
Gets IP v6 multicast option on socket.
handle | The socket handle. |
socket_option_name | One of socket option name values (see socket_option_name_constants.h). |
multicast_address | The local IP address associated with a multicast group. |
interface_index | The interface index that is associated with a multicast group. |
|
staticprotected |
Sets low-level operating modes for the Socket using the IOControlCode enumeration to specify control codes.
handle | The socket handle. |
io_control | A io control code value that specifies the control code of the operation to perform (see io_control_code_constants.h). |
option_in_value | An array of type byte that contains the input data required by the operation. |
option_out_value | An array of type byte that contains the output data returned by the operation. |
|
staticprotected |
Listens for connections on a socket.
handle | The socket handle. |
backlog | The maximum length for the queue of pending connections. |
|
staticprotected |
Synchronous I/O multiplexing.
handle | The socket handle. |
microseconds | Timeout in microseconds. |
mode | One of select mode value (see select_mode_constants.h). |
|
staticprotected |
Receives a message from a socket.
handle | The socket handle. |
buffer | An array of type byte that is the storage location for the received data. |
offset | The location in buffer to store the received data. |
size | The number of bytes to receive. |
flags | A bitwise combination of the socket flags values. (see socket_flags_constants.h) |
|
staticprotected |
Receives a message from a socket.
handle | The socket handle. |
buffer | An array of type byte that is the storage location for the received data. |
offset | The location in buffer to store the received data. |
size | The number of bytes to receive. |
flags | A bitwise combination of the socket flags values. (see socket_flags_constants.h) |
socket_address | A byte array socket address to receive from. |
|
staticprotected |
Determines the status of one or more sockets.
check_read | An xtd::collections::generic::ilist of Socket instances to check for readability. |
check_write | An xtd::collections::generic::ilist of Socket instances to check for writability. |
check_error | An xtd::collections::generic::ilist of Socket instances to check for errors. |
microseconds | The time-out value, in microseconds. A -1 value indicates an infinite time-out. |
|
staticprotected |
send a message from a socket.
buffer | An array of type Byte that contains the data to be sent. |
offset | TThe position in the data buffer at which to begin sending data. |
size | The number of bytes to send. |
flags | A bitwise combination of the socket flags values. (see socket_flags_constants.h) |
|
staticprotected |
send a message from a socket.
handle | The socket handle. |
buffer | An array of type Byte that contains the data to be sent. |
offset | TThe position in the data buffer at which to begin sending data. |
size | The number of bytes to send. |
flags | A bitwise combination of the socket flags values. (see socket_flags_constants.h) |
socket_address | A byte array socket address to send to. |
|
staticprotected |
Sets a value that indicates whether the socket is in blocking mode.
handle | The socket handle. |
blocking | bool true if the Socket will block; otherwise, false. The default is true |
|
staticprotected |
Sets options on socket.
handle | The socket handle. |
socket_option_level | The platform-defined option name. |
socket_option_name | The value to which the option should be set. |
option | Contains the option value. |
option_length | Contains the option value size. |
|
staticprotected |
Sets options on socket.
handle | The socket handle. |
socket_option_level | One of socket option level values (see socket_option_level_constants.h). |
socket_option_name | One of socket option name values (see socket_option_name_constants.h). |
option | Contains the option value. |
option_length | Contains the option value size. |
|
staticprotected |
Sets linger option on socket.
handle | The socket handle. |
enabled | Indicates whether to linger after the socket is closed.. |
linger_time | The amount of time to remain connected after calling the socket close method if data remains to be sent. |
|
staticprotected |
Sets multicast option on socket.
handle | The socket handle. |
socket_option_name | One of socket option name values (see socket_option_name_constants.h). |
multicast_address | The local IP address associated with a multicast group. |
interface_index | The interface index that is associated with a multicast group. |
|
staticprotected |
Sets IP v6 multicast option on socket.
handle | The socket handle. |
socket_option_name | One of socket option name values (see socket_option_name_constants.h). |
multicast_address | The local IP address associated with a multicast group. |
interface_index | The interface index that is associated with a multicast group. |
linger_time | The amount of time to remain connected after calling the socket close method if data remains to be sent. |
|
staticprotected |
Shut down part of a full-duplex connection.
handle | The socket handle. |
how | One of socket shutdown values (see socket_shutdown_constants.h). |
|
staticprotected |
Startup the socket library.