C# 클래스 WebSocketSharp.Server.WebSocketServiceHostManager

Manages the WebSocket services provided by the HttpServer and WebSocketServer.
파일 보기 프로젝트 열기: uken/websocket-sharp 1 사용 예제들

공개 메소드들

메소드 설명
Broadcast ( byte data ) : void

Broadcasts a binary data to all clients of the WebSocket services provided by the server.

Broadcast ( string data ) : void

Broadcasts a text data to all clients of the WebSocket services provided by the server.

BroadcastAsync ( System.Stream stream, int length, System.Action completed ) : void

Broadcasts a binary data from the specified Stream asynchronously to all clients of the WebSocket services provided by the server.

This method doesn't wait for the broadcast to be complete.

BroadcastAsync ( byte data, System.Action completed ) : void

Broadcasts a binary data asynchronously to all clients of the WebSocket services provided by the server.

This method doesn't wait for the broadcast to be complete.

BroadcastAsync ( string data, System.Action completed ) : void

Broadcasts a text data asynchronously to all clients of the WebSocket services provided by the server.

This method doesn't wait for the broadcast to be complete.

BroadcastTo ( string servicePath, byte data ) : void

Broadcasts a binary data to all clients of the WebSocket service with the specified servicePath.

BroadcastTo ( string servicePath, string data ) : void

Broadcasts a text data to all clients of the WebSocket service with the specified servicePath.

BroadcastToAsync ( string servicePath, System.Stream stream, int length, System.Action completed ) : void

Broadcasts a binary data from the specified Stream asynchronously to all clients of the WebSocket service with the specified servicePath.

This method doesn't wait for the broadcast to be complete.

BroadcastToAsync ( string servicePath, byte data, System.Action completed ) : void

Broadcasts a binary data asynchronously to all clients of the WebSocket service with the specified servicePath.

This method doesn't wait for the broadcast to be complete.

BroadcastToAsync ( string servicePath, string data, System.Action completed ) : void

Broadcasts a text data asynchronously to all clients of the WebSocket service with the specified servicePath.

This method doesn't wait for the broadcast to be complete.

Broadping ( ) : Dictionary>

Sends Pings to all clients of the WebSocket services provided by the server.

Broadping ( string message ) : Dictionary>

Sends Pings with the specified message to all clients of the WebSocket services provided by the server.

BroadpingTo ( string servicePath ) : bool>.Dictionary

Sends Pings to all clients of the WebSocket service with the specified servicePath.

BroadpingTo ( string servicePath, string message ) : bool>.Dictionary

Sends Pings with the specified message to all clients of the WebSocket service with the specified servicePath.

CloseSession ( string servicePath, string id ) : void

Closes the session with the specified servicePath and id.

CloseSession ( string servicePath, string id, CloseStatusCode code, string reason ) : void

Closes the session with the specified servicePath, id, code and reason.

CloseSession ( string servicePath, string id, ushort code, string reason ) : void

Closes the session with the specified servicePath, id, code and reason.

PingTo ( string servicePath, string id ) : bool

Sends a Ping to the client associated with the specified servicePath and id.

PingTo ( string servicePath, string id, string message ) : bool

Sends a Ping with the specified message to the client associated with the specified servicePath and id.

SendTo ( string servicePath, string id, byte data ) : void

Sends a binary data to the client on the session with the specified id, in the WebSocket service with the specified servicePath.

SendTo ( string servicePath, string id, string data ) : void

Sends a text data to the client on the session with the specified id, in the WebSocket service with the specified servicePath.

SendToAsync ( string servicePath, string id, System.Stream stream, int length, Action completed ) : void

Sends a binary data from the specified Stream asynchronously to the client on the session with the specified id, in the WebSocket service with the specified servicePath.

This method doesn't wait for the send to be complete.

SendToAsync ( string servicePath, string id, byte data, Action completed ) : void

Sends a binary data asynchronously to the client on the session with the specified id, in the WebSocket service with the specified servicePath.

This method doesn't wait for the send to be complete.

SendToAsync ( string servicePath, string id, string data, Action completed ) : void

Sends a text data asynchronously to the client on the session with the specified id, in the WebSocket service with the specified servicePath.

This method doesn't wait for the send to be complete.

TryGetServiceHost ( string servicePath, WebSocketSharp.Server.WebSocketServiceHost &serviceHost ) : bool

Tries to get a WebSocket service host with the specified servicePath.

this ( string servicePath ) : WebSocketSharp.Server.WebSocketServiceHost

Gets a WebSocket service host with the specified servicePath.

비공개 메소드들

메소드 설명
Add ( string servicePath, WebSocketSharp.Server.WebSocketServiceHost serviceHost ) : void
Remove ( string servicePath ) : bool
Start ( ) : void
Stop ( byte data, bool send ) : void
TryGetServiceHostInternally ( string servicePath, WebSocketSharp.Server.WebSocketServiceHost &serviceHost ) : bool
WebSocketServiceHostManager ( ) : System
WebSocketServiceHostManager ( System.Logger logger ) : System
broadcast ( Opcode opcode, System.Stream stream, System.Action completed ) : void
broadcast ( Opcode opcode, byte data, System.Action completed ) : void
broadcastAsync ( Opcode opcode, System.Stream stream, System.Action completed ) : void
broadcastAsync ( Opcode opcode, byte data, System.Action completed ) : void
broadping ( byte frameAsBytes, int timeOut ) : Dictionary>
checkIfCanSend ( Func checkParams ) : string

메소드 상세

Broadcast() 공개 메소드

Broadcasts a binary data to all clients of the WebSocket services provided by the server.
public Broadcast ( byte data ) : void
data byte /// An array of that represents the binary data /// to broadcast. ///
리턴 void

Broadcast() 공개 메소드

Broadcasts a text data to all clients of the WebSocket services provided by the server.
public Broadcast ( string data ) : void
data string /// A that represents the text data to broadcast. ///
리턴 void

BroadcastAsync() 공개 메소드

Broadcasts a binary data from the specified Stream asynchronously to all clients of the WebSocket services provided by the server.
This method doesn't wait for the broadcast to be complete.
public BroadcastAsync ( System.Stream stream, int length, System.Action completed ) : void
stream System.Stream /// A from which contains the binary data to broadcast. ///
length int /// An that represents the number of bytes to broadcast. ///
completed System.Action /// A delegate that references the method(s) called when /// the broadcast is complete. ///
리턴 void

BroadcastAsync() 공개 메소드

Broadcasts a binary data asynchronously to all clients of the WebSocket services provided by the server.
This method doesn't wait for the broadcast to be complete.
public BroadcastAsync ( byte data, System.Action completed ) : void
data byte /// An array of that represents the binary data /// to broadcast. ///
completed System.Action /// A delegate that references the method(s) called when /// the broadcast is complete. ///
리턴 void

BroadcastAsync() 공개 메소드

Broadcasts a text data asynchronously to all clients of the WebSocket services provided by the server.
This method doesn't wait for the broadcast to be complete.
public BroadcastAsync ( string data, System.Action completed ) : void
data string /// A that represents the text data to broadcast. ///
completed System.Action /// A delegate that references the method(s) called when /// the broadcast is complete. ///
리턴 void

BroadcastTo() 공개 메소드

Broadcasts a binary data to all clients of the WebSocket service with the specified servicePath.
public BroadcastTo ( string servicePath, byte data ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
data byte /// An array of that represents the binary data /// to broadcast. ///
리턴 void

BroadcastTo() 공개 메소드

Broadcasts a text data to all clients of the WebSocket service with the specified servicePath.
public BroadcastTo ( string servicePath, string data ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
data string /// A that represents the text data to broadcast. ///
리턴 void

BroadcastToAsync() 공개 메소드

Broadcasts a binary data from the specified Stream asynchronously to all clients of the WebSocket service with the specified servicePath.
This method doesn't wait for the broadcast to be complete.
public BroadcastToAsync ( string servicePath, System.Stream stream, int length, System.Action completed ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
stream System.Stream /// A from which contains the binary data to broadcast. ///
length int /// An that represents the number of bytes to broadcast. ///
completed System.Action /// A delegate that references the method(s) called when /// the broadcast is complete. ///
리턴 void

BroadcastToAsync() 공개 메소드

Broadcasts a binary data asynchronously to all clients of the WebSocket service with the specified servicePath.
This method doesn't wait for the broadcast to be complete.
public BroadcastToAsync ( string servicePath, byte data, System.Action completed ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
data byte /// An array of that represents the binary data /// to broadcast. ///
completed System.Action /// A delegate that references the method(s) called when /// the broadcast is complete. ///
리턴 void

BroadcastToAsync() 공개 메소드

Broadcasts a text data asynchronously to all clients of the WebSocket service with the specified servicePath.
This method doesn't wait for the broadcast to be complete.
public BroadcastToAsync ( string servicePath, string data, System.Action completed ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
data string /// A that represents the text data to broadcast. ///
completed System.Action /// A delegate that references the method(s) called when /// the broadcast is complete. ///
리턴 void

Broadping() 공개 메소드

Sends Pings to all clients of the WebSocket services provided by the server.
public Broadping ( ) : Dictionary>
리턴 Dictionary>

Broadping() 공개 메소드

Sends Pings with the specified message to all clients of the WebSocket services provided by the server.
public Broadping ( string message ) : Dictionary>
message string /// A that represents the message to broadcast. ///
리턴 Dictionary>

BroadpingTo() 공개 메소드

Sends Pings to all clients of the WebSocket service with the specified servicePath.
public BroadpingTo ( string servicePath ) : bool>.Dictionary
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
리턴 bool>.Dictionary

BroadpingTo() 공개 메소드

Sends Pings with the specified message to all clients of the WebSocket service with the specified servicePath.
public BroadpingTo ( string servicePath, string message ) : bool>.Dictionary
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
message string /// A that represents the message to send. ///
리턴 bool>.Dictionary

CloseSession() 공개 메소드

Closes the session with the specified servicePath and id.
public CloseSession ( string servicePath, string id ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to close. ///
리턴 void

CloseSession() 공개 메소드

Closes the session with the specified servicePath, id, code and reason.
public CloseSession ( string servicePath, string id, CloseStatusCode code, string reason ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to close. ///
code CloseStatusCode /// One of the values that indicate the status /// codes for closure. ///
reason string /// A that represents the reason for closure. ///
리턴 void

CloseSession() 공개 메소드

Closes the session with the specified servicePath, id, code and reason.
public CloseSession ( string servicePath, string id, ushort code, string reason ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to close. ///
code ushort /// A that represents the status code for closure. ///
reason string /// A that represents the reason for closure. ///
리턴 void

PingTo() 공개 메소드

Sends a Ping to the client associated with the specified servicePath and id.
public PingTo ( string servicePath, string id ) : bool
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to send the /// Ping to. ///
리턴 bool

PingTo() 공개 메소드

Sends a Ping with the specified message to the client associated with the specified servicePath and id.
public PingTo ( string servicePath, string id, string message ) : bool
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to send the /// Ping to. ///
message string /// A that represents the message to send. ///
리턴 bool

SendTo() 공개 메소드

Sends a binary data to the client on the session with the specified id, in the WebSocket service with the specified servicePath.
public SendTo ( string servicePath, string id, byte data ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to find. ///
data byte /// An array of that represents the binary data to send. ///
리턴 void

SendTo() 공개 메소드

Sends a text data to the client on the session with the specified id, in the WebSocket service with the specified servicePath.
public SendTo ( string servicePath, string id, string data ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to find. ///
data string /// A that represents the text data to send. ///
리턴 void

SendToAsync() 공개 메소드

Sends a binary data from the specified Stream asynchronously to the client on the session with the specified id, in the WebSocket service with the specified servicePath.
This method doesn't wait for the send to be complete.
public SendToAsync ( string servicePath, string id, System.Stream stream, int length, Action completed ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to find. ///
stream System.Stream /// A from which contains the binary data to send. ///
length int /// An that represents the number of bytes to send. ///
completed Action /// An Action<bool> delegate that references the method(s) called when /// the send is complete. /// A passed to this delegate is true if the send is /// complete successfully; otherwise, false. ///
리턴 void

SendToAsync() 공개 메소드

Sends a binary data asynchronously to the client on the session with the specified id, in the WebSocket service with the specified servicePath.
This method doesn't wait for the send to be complete.
public SendToAsync ( string servicePath, string id, byte data, Action completed ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to find. ///
data byte /// An array of that represents the binary data to send. ///
completed Action /// An Action<bool> delegate that references the method(s) called when /// the send is complete. /// A passed to this delegate is true if the send is /// complete successfully; otherwise, false. ///
리턴 void

SendToAsync() 공개 메소드

Sends a text data asynchronously to the client on the session with the specified id, in the WebSocket service with the specified servicePath.
This method doesn't wait for the send to be complete.
public SendToAsync ( string servicePath, string id, string data, Action completed ) : void
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
id string /// A that represents the ID of the session to find. ///
data string /// A that represents the text data to send. ///
completed Action /// An Action<bool> delegate that references the method(s) called when /// the send is complete. /// A passed to this delegate is true if the send is /// complete successfully; otherwise, false. ///
리턴 void

TryGetServiceHost() 공개 메소드

Tries to get a WebSocket service host with the specified servicePath.
public TryGetServiceHost ( string servicePath, WebSocketSharp.Server.WebSocketServiceHost &serviceHost ) : bool
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
serviceHost WebSocketSharp.Server.WebSocketServiceHost /// When this method returns, a instance /// that represents the WebSocket service host if it's successfully found; /// otherwise, . This parameter is passed uninitialized. ///
리턴 bool

this() 공개 메소드

Gets a WebSocket service host with the specified servicePath.
public this ( string servicePath ) : WebSocketSharp.Server.WebSocketServiceHost
servicePath string /// A that represents the absolute path to the WebSocket /// service to find. ///
리턴 WebSocketSharp.Server.WebSocketServiceHost