Mentalis.org Security Library documentation

SecureSocket.BeginSend Method 

Sends data asynchronously to a connected SecureSocket.

[Visual Basic]
Overrides Public Function BeginSend( _
   ByVal buffer As Byte(), _
   ByVal offset As Integer, _
   ByVal size As Integer, _
   ByVal socketFlags As SocketFlags, _
   ByVal callback As AsyncCallback, _
   ByVal state As Object _
) As IAsyncResult
[C#]
public override IAsyncResult BeginSend(
   byte[] buffer,
   int offset,
   int size,
   SocketFlags socketFlags,
   AsyncCallback callback,
   object state
);

Parameters

buffer
The data to send.
offset
The zero-based position in the buffer parameter at which to begin sending data.
size
The number of bytes to send.
socketFlags
A bitwise combination of the SocketFlags values.
callback
The AsyncCallback delegate.
state
An object containing state information for this request.

Return Value

An IAsyncResult that references the asynchronous send.

Exceptions

Exception TypeCondition
ArgumentNullExceptionbuffer is a null reference (Nothing in Visual Basic).
SocketExceptionAn operating system error occurs while accessing the SecureSocket.
ArgumentOutOfRangeExceptionThe specified offset or size exceeds the size of buffer.
ObjectDisposedExceptionThe SecureSocket has been closed.
SecurityExceptionAn error occurred while encrypting the data.

See Also

SecureSocket Class | SecureSocket Members | Org.Mentalis.Security.Ssl Namespace