Click or drag to resize

WebSocketSessionManagerSendToAsync Method (Byte, String, ActionBoolean)

Sends data asynchronously to the client using the specified session.

Namespace:  Sfs2X.WebSocketSharp.Server
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public void SendToAsync(
	byte[] data,
	string id,
	Action<bool> completed
)

Parameters

data
Type: SystemByte
An array of Byte that represents the binary data to send.
id
Type: SystemString
A String that represents the ID of the session.
completed
Type: SystemActionBoolean

An Action<bool> delegate or if not needed.

The delegate invokes the method called when the send is complete.

true is passed to the method if the send has done with no error; otherwise, false.

Exceptions
ExceptionCondition
ArgumentNullException

id is .

-or-

data is .

ArgumentExceptionid is an empty string.
InvalidOperationException

The session could not be found.

-or-

The current state of the WebSocket connection is not Open.

Remarks
This method does not wait for the send to be complete.
See Also