Sends data to a connected VirtualSocket, starting at the indicated location in the data.
The number of bytes sent to the VirtualSocket.
Use Send for connection-oriented protocols only. For connectionless protocols, either use SendTo or call Connect first, and then call Send.
This overload gives you the flexibility to specify the Send starting position in the data buffer, the number bytes you are sending, and the necessary SocketFlags.
You must set the LocalEndPoint property of the current instance before calling this method.
If you specify the DontRoute flag as the socketflags parameter, the data you are sending will not be routed. If you specify the OutOfBand flag as the socketflags parameter, only out-of-band (OOB) data is sent.
If you set the Blocking property to true, and buffer space is not available within the underlying protocol, this method blocks.
If you are using a message-oriented Socket, and the size of the buffer is greater than the maximum message size of the underlying protocol, no data is sent and Socket will throw a SocketException.
Exception Type | Condition |
---|---|
ArgumentNullException | buffer is a null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | The offset or size parameter exceeds the size of buffer. |
SocketException | An operating system error occurs while accessing the socket. |
ObjectDisposedException | The VirtualSocket has been closed. |
VirtualSocket Class | Org.Mentalis.Security.Ssl Namespace | VirtualSocket.Send Overload List