Click or drag to resize

WebSocketSessionManagerSendToAsync Method (String, 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(
	string data,
	string id,
	Action<bool> completed
)

Parameters

data
Type: SystemString
A String that represents the text 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 .

ArgumentException

id is an empty string.

-or-

data could not be UTF-8-encoded.

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