websocket-sharp : WebSocketSharp.Server Namespace

IServiceHost Interface

Exposes the methods and property for the WebSocket service host.

Syntax

public interface IServiceHost

Remarks

Requirements

Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

Members

Public Properties

Sweeped bool . Gets or sets a value indicating whether the WebSocket service host cleans up the inactive service clients periodically.

Public Methods

BindWebSocket (WebSocketSharp.WebSocket)
Binds the specified WebSocketSharp.WebSocket to the WebSocket service instance.
Broadcast (string)
Broadcasts the specified string to all service clients.
Start ()
Starts the WebSocket service host.
Stop ()
Stops the WebSocket service host.

Extension Methods

static
IsNull<T> (this T) : bool
Determines whether the specified object is null.
static
IsNullDo<T> (this T, Action) : bool
Determines whether the specified object is null. And invokes the specified Action delegate if the specified object is null.

Member Details

BindWebSocket Method

Binds the specified WebSocketSharp.WebSocket to the WebSocket service instance.

Syntax

public void BindWebSocket (WebSocketSharp.WebSocket socket)

Parameters

socket
A WebSocketSharp.WebSocket to bind.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

Broadcast Method

Broadcasts the specified string to all service clients.

Syntax

public void Broadcast (string data)

Parameters

data
A string to broadcast.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

Start Method

Starts the WebSocket service host.

Syntax

public void Start ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

Stop Method

Stops the WebSocket service host.

Syntax

public void Stop ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

Sweeped Property

Gets or sets a value indicating whether the WebSocket service host cleans up the inactive service clients periodically.

Syntax

public bool Sweeped { get; set; }

Value

true if the WebSocket service host cleans up the inactive service clients periodically; otherwise, false.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)