Click or drag to resize

HttpServerAddWebSocketServiceTBehaviorWithNew Method (String)

Adds a WebSocket service with the specified behavior and path.

Namespace:  Sfs2X.WebSocketSharp.Server
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public void AddWebSocketService<TBehaviorWithNew>(
	string path
)
where TBehaviorWithNew : new(), WebSocketBehavior

Parameters

path
Type: SystemString
A String that represents an absolute path to the service to add.

Type Parameters

TBehaviorWithNew

The type of the behavior for the service.

It must inherit the WebSocketBehavior class and must have a public parameterless constructor.

Exceptions
ExceptionCondition
ArgumentNullExceptionpath is .
ArgumentException

path is an empty string.

-or-

path is not an absolute path.

-or-

path includes either or both query and fragment components.

-or-

path is already in use.

Remarks
path is converted to a URL-decoded string and '/' is trimmed from the end of the converted string if any.
See Also