C# Class LitDev.LDServer

Afficher le fichier Open project: litdev1/LitDev Class Usage Examples

Méthodes publiques

Свойство Type Description
_ClientMessageDelegate SmallBasicCallback
lastClient string
lastClientConnected string
lastClientDisconnected string
lastClientMessage string

Private Properties

Свойство Type Description
ClientMessageDelegate void
GetClient Client
GetClient Client
Listen void
MonitorClients void
NextClient string
RemoveClient Client
Send string

Méthodes publiques

Méthode Description
Close ( Primitive clientName ) : Primitive

Disconnect and close (End) a client.

Disconnect ( Primitive clientName ) : Primitive

Disconnect a client.

GetClients ( ) : Primitive

Get a list of current connected clients.

SendMessage ( Primitive clientName, Primitive message ) : Primitive

Send a message to a client.

Start ( Primitive auto ) : Primitive

Start the server.

Stop ( ) : Primitive

Stop the current server and close all clients.

Private Methods

Méthode Description
ClientMessageDelegate ( string client, string message ) : void
GetClient ( EndPoint endPoint ) : Client
GetClient ( string name ) : Client
Listen ( ) : void
MonitorClients ( ) : void
NextClient ( ) : string
RemoveClient ( string name ) : Client
Send ( string clientName, string message ) : string

Method Details

Close() public static méthode

Disconnect and close (End) a client.
public static Close ( Primitive clientName ) : Primitive
clientName Primitive The client name, usually Client1, Client2 etc. /// A list of current clients can be obtained from the method GetClients or found from the ClientConnected event.
Résultat Primitive

Disconnect() public static méthode

Disconnect a client.
public static Disconnect ( Primitive clientName ) : Primitive
clientName Primitive The client name, usually Client1, Client2 etc. /// A list of current clients can be obtained from the method GetClients or found from the ClientConnected event.
Résultat Primitive

GetClients() public static méthode

Get a list of current connected clients.
public static GetClients ( ) : Primitive
Résultat Primitive

SendMessage() public static méthode

Send a message to a client.
public static SendMessage ( Primitive clientName, Primitive message ) : Primitive
clientName Primitive The client name, usually Client1, Client2 etc. /// A list of current clients can be obtained from the method GetClients or found from the ClientConnected event.
message Primitive The message may be any variable including an array.
Résultat Primitive

Start() public static méthode

Start the server.
public static Start ( Primitive auto ) : Primitive
auto Primitive Enable auto message passing "True" or "False". /// If this is used (recommended) then all client data is passed via server to all other clients, /// and no processing of send and receive events is required. /// The data is updated to arrays of data (indexed by client name) that is returned from the client Update methods. /// The auto option should be the same for server and all clients.
Résultat Primitive

Stop() public static méthode

Stop the current server and close all clients.
public static Stop ( ) : Primitive
Résultat Primitive

Property Details

_ClientMessageDelegate public_oe static_oe property

public static SmallBasicCallback _ClientMessageDelegate
Résultat SmallBasicCallback

lastClient public_oe static_oe property

public static string lastClient
Résultat string

lastClientConnected public_oe static_oe property

public static string lastClientConnected
Résultat string

lastClientDisconnected public_oe static_oe property

public static string lastClientDisconnected
Résultat string

lastClientMessage public_oe static_oe property

public static string lastClientMessage
Résultat string