Write a string of characters to the socket.
An integer value which specifies the number of bytes actually written to the socket. If an error occurs, a value of -1 is returned and the application should check the value of the LastError property to determine the cause of the failure.
The WriteTo method sends a string of characters to the remote host. If there is enough room in the socket's internal send buffer to accommodate all of the data, it is copied to the send buffer and control immediately returns to the caller. If amount of data exceeds the available buffer space and the socket is in blocking mode, then the method will block until the data can be sent. If the socket is in non-blocking mode and the send buffer is full, an error will occur.
This method is typically used when writing text data to a datagram socket.
SocketWrench Class | SocketTools Namespace | SocketWrench.WriteTo Overload List