Click or drag to resize

WebSocketSessionManagerPingTo Method (String, String)

Sends a ping with message 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 bool PingTo(
	string message,
	string id
)

Parameters

message
Type: SystemString

A String that represents the message to send.

The size must be 125 bytes or less in UTF-8.

id
Type: SystemString
A String that represents the ID of the session.

Return Value

Type: Boolean
true if the send has done with no error and a pong has been received from the client within a time; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullExceptionid is .
ArgumentException

id is an empty string.

-or-

message could not be UTF-8-encoded.

InvalidOperationException The session could not be found.
ArgumentOutOfRangeException The size of message is greater than 125 bytes.
See Also