websocket-sharp : WebSocketSharp.Server Namespace

# WebSocketServiceManager Class

Manages the collection of WebSocketSharp.Server.WebSocketService objects.

## Syntax

public class WebSocketServiceManager

## Remarks

Documentation for this section has not yet been entered.

## Requirements

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

## Members

See Also: Inherited members from object.

## Public Properties

[read-only] | ActiveIDs | IEnumerable<string> . Gets the collection of IDs of active WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.
[read-only] | Count | int . Gets the number of WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.
[read-only] | IDs | IEnumerable<string> . Gets the collection of IDs of WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.
[read-only] | InactiveIDs | IEnumerable<string> . Gets the collection of IDs of inactive WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.
[read-only] | Sweeped | bool . Gets a value indicating whether the WebSocketSharp.Server.WebSocketServiceManager cleans up the inactive WebSocketSharp.Server.WebSocketService objects periodically.

## Public Methods

Broadcast (byte[])

> Broadcasts the specified array of byte to the clients of every WebSocketSharp.Server.WebSocketService managed by the WebSocketSharp.Server.WebSocketServiceManager.

Broadcast (string)

> Broadcasts the specified string to the clients of every WebSocketSharp.Server.WebSocketService managed by the WebSocketSharp.Server.WebSocketServiceManager.

Broadping (string) : Dictionary<string, bool>

> Pings with the specified string to the clients of every WebSocketSharp.Server.WebSocketService managed by the WebSocketSharp.Server.WebSocketServiceManager.

Sweep ()

> Cleans up the inactive WebSocketSharp.Server.WebSocketService objects.

TryGetWebSocketService (string, out WebSocketService) : bool

> Tries to get the WebSocketSharp.Server.WebSocketService associated with the specified id.

## 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

### ActiveIDs Property

> Gets the collection of IDs of active WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## Syntax

> public IEnumerable<string> ActiveIDs { get; }

> #### Value

> > An IEnumerable<string> that contains the collection of IDs of active WebSocketSharp.Server.WebSocketService objects.

> ## 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 array of byte to the clients of every WebSocketSharp.Server.WebSocketService managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## Syntax

> public void Broadcast (byte[] data)

> #### Parameters

> > data
> >   An array of byte to broadcast.

> ## 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 the clients of every WebSocketSharp.Server.WebSocketService managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## 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)

### Broadping Method

> Pings with the specified string to the clients of every WebSocketSharp.Server.WebSocketService managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## Syntax

> public Dictionary<string, bool> Broadping (string message)

> #### Parameters

> > message
> >   A string that contains a message.

> #### Returns

> > A Dictionary<string, bool> that contains the collection of IDs and values indicating whether each WebSocketSharp.Server.WebSocketService received a Pong in a time.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### Count Property

> Gets the number of WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## Syntax

> public int Count { get; }

> #### Value

> > An int that contains the number of WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### IDs Property

> Gets the collection of IDs of WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## Syntax

> public IEnumerable<string> IDs { get; }

> #### Value

> > An IEnumerable<string> that contains the collection of IDs of WebSocketSharp.Server.WebSocketService objects.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### InactiveIDs Property

> Gets the collection of IDs of inactive WebSocketSharp.Server.WebSocketService objects managed by the WebSocketSharp.Server.WebSocketServiceManager.

> ## Syntax

> public IEnumerable<string> InactiveIDs { get; }

> #### Value

> > An IEnumerable<string> that contains the collection of IDs of inactive WebSocketSharp.Server.WebSocketService objects.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### Sweep Method

> Cleans up the inactive WebSocketSharp.Server.WebSocketService objects.

> ## Syntax

> public void Sweep ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### Sweeped Property

> Gets a value indicating whether the WebSocketSharp.Server.WebSocketServiceManager cleans up the inactive WebSocketSharp.Server.WebSocketService objects periodically.

> ## Syntax

> public bool Sweeped { get; }

> #### Value

> > `true` if the WebSocketSharp.Server.WebSocketServiceManager cleans up the inactive WebSocketSharp.Server.WebSocketService objects every 60 seconds; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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

### TryGetWebSocketService Method

> Tries to get the WebSocketSharp.Server.WebSocketService associated with the specified id.

> ## Syntax

> public bool TryGetWebSocketService (string id, out WebSocketService service)

> #### Parameters

> > id
> >   A string that contains the ID to find.
> > service
> >   When this method returns, contains the WebSocketSharp.Server.WebSocketService with the specified id, if the id is found; otherwise, `null`.

> #### Returns

> > `true` if the WebSocketSharp.Server.WebSocketServiceManager manages the WebSocketSharp.Server.WebSocketService with the specified id; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

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