Sends data to a connected xtd::net::sockets::socket.
- Parameters
-
buffer | An array of type byte that contains the data to be sent. |
- Returns
- The number of bytes sent to the xtd::net::sockets::socket.
- Exceptions
-
- Note
- The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
-
If you receive a xtd::net::sockets::socket_exception exception, use the xtd::net::sockets::socket_exception::error_code property to obtain the specific error code. After you have obtained this code, refer to the Windows Sockets version 2 API error code documentation in the MSDN library for a detailed description of the error.
- Examples
- socket_tcp_ip_v4_without_thread.cpp.