Method | Description | |
---|---|---|
DisconnectAll ( ) : void |
Disconnects all of the connected clients.
|
|
DisconnectOne ( System.Guid clientID ) : void |
Disconnects a connected client.
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
Initialize ( ) : void |
Initializes the state of the object.
|
|
Multicast ( byte data, int offset, int length ) : void |
Sends data to all of the connected clients synchronously.
|
|
MulticastAsync ( byte data, int offset, int length ) : System.Threading.WaitHandle[] |
Sends data to all of the connected clients asynchronously.
|
|
Read ( System.Guid clientID, byte buffer, int startIndex, int length ) : int |
Reads a number of bytes from the current received data buffer and writes those bytes into a byte array at the specified offset. This function should only be called from within the ReceiveClientData event handler. Calling this method outside this event will have unexpected results. |
|
SendTo ( System.Guid clientID, byte data, int offset, int length ) : void |
Sends data to the specified client synchronously.
|
|
SendToAsync ( System.Guid clientID, byte data, int offset, int length ) : |
Sends data to the specified client asynchronously.
|
|
Start ( ) : void |
Starts the server.
|
|
Stop ( ) : void |
Stops the server.
|
Method | Description | |
---|---|---|
GetLocalEndPoint ( ) : |
Determines the local end point this server intends to listen on via configuration string properties.
|
|
GetSharedServer ( ) : void |
Gets a reference to the shared server listening on this server's local end point.
|
|
ReturnSharedServer ( ) : void |
Releases a reference to this server's shared server, and disposes of the shared server if nobody is using it.
|
|
SharedServer_ClientConnected ( object sender, EventArgs |
||
SharedServer_ClientConnectingException ( object sender, EventArgs |
||
SharedServer_ClientDisconnected ( object sender, EventArgs |
||
SharedServer_ReceiveClientData ( object sender, int>.EventArgs |
||
SharedServer_ReceiveClientDataException ( object sender, Exception>.EventArgs |
||
SharedServer_SendClientDataException ( object sender, Exception>.EventArgs |
||
SharedServer_ServerStarted ( object sender, |
||
SharedServer_ServerStopped ( object sender, |
||
SharedServer_UnhandledUserException ( object sender, EventArgs |
||
TerminateSharedClient ( ) : void |
Terminates the server as quickly as possible and removes it from the collection of shared servers.
|
public DisconnectOne ( System.Guid clientID ) : void | ||
clientID | System.Guid | ID of the client to be disconnected. |
return | void |
public Multicast ( byte data, int offset, int length ) : void | ||
data | byte | The buffer that contains the binary data to be sent. |
offset | int | The zero-based position in the |
length | int | The number of bytes to be sent from |
return | void |
public MulticastAsync ( byte data, int offset, int length ) : System.Threading.WaitHandle[] | ||
data | byte | The buffer that contains the binary data to be sent. |
offset | int | The zero-based position in the |
length | int | The number of bytes to be sent from |
return | System.Threading.WaitHandle[] |
public Read ( System.Guid clientID, byte buffer, int startIndex, int length ) : int | ||
clientID | System.Guid | ID of the client from which data buffer should be read. |
buffer | byte | Destination buffer used to hold copied bytes. |
startIndex | int | 0-based starting index into destination |
length | int | The number of bytes to read from current received data buffer and write into |
return | int |
public SendTo ( System.Guid clientID, byte data, int offset, int length ) : void | ||
clientID | System.Guid | ID of the client to which the data is to be sent. |
data | byte | The buffer that contains the binary data to be sent. |
offset | int | The zero-based position in the |
length | int | The number of bytes to be sent from |
return | void |
public SendToAsync ( System.Guid clientID, byte data, int offset, int length ) : |
||
clientID | System.Guid | ID of the client to which the data is to be sent. |
data | byte | The buffer that contains the binary data to be sent. |
offset | int | The zero-based position in the |
length | int | The number of bytes to be sent from |
return |