Click or drag to resize

WebSocketSendAsync Method (String, ActionBoolean)

Sends the specified data asynchronously using the WebSocket connection.

Namespace:  Sfs2X.WebSocketSharp
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public void SendAsync(
	string data,
	Action<bool> completed
)

Parameters

data
Type: SystemString
A String that represents the text data to send.
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
InvalidOperationException The current state of the connection is not Open.
ArgumentNullExceptiondata is .
ArgumentExceptiondata could not be UTF-8-encoded.
Remarks
This method does not wait for the send to be complete.
See Also