HttpServerAddWebSocketServiceTBehavior Method (String, FuncTBehavior) |
Note: This API is now obsolete.
Namespace: Sfs2X.WebSocketSharp.Server
[ObsoleteAttribute("This method will be removed. Use added one instead.")] public void AddWebSocketService<TBehavior>( string path, Func<TBehavior> creator ) where TBehavior : WebSocketBehavior
A Func<TBehavior> delegate.
It invokes the method called for creating a new session instance for the service.
The method must create a new instance of the specified behavior class and return it.
The type of the behavior for the service.
It must inherit the WebSocketBehavior class.
Exception | Condition |
---|---|
ArgumentNullException | path is . -or- creator 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. |