C# Class Descent.Messaging.Connection.ServerConnection

A TCP server connection.
Inheritance: Connection
Afficher le fichier Open project: nezbo/Descent

Private Properties

Свойство Type Description
AcceptProcedure bool
ClientConnected bool
MessageReceived void

Méthodes publiques

Méthode Description
Close ( ) : void
SendString ( string message ) : void

Sends a string through the server. Will send to all clients except the sender of the message.

ServerConnection ( int port ) : System
Start ( ) : void

Start the server. Will listen on port for new clients.

Private Methods

Méthode Description
AcceptProcedure ( ClientInfo newClient ) : bool

Decides if a new client can join the server.

ClientConnected ( ClientInfo newClient ) : bool

Called when a client has connected.

MessageReceived ( ClientInfo fromClient, string message ) : void

Called when a message was received.

Method Details

Close() public méthode

public Close ( ) : void
Résultat void

SendString() public méthode

Sends a string through the server. Will send to all clients except the sender of the message.
public SendString ( string message ) : void
message string The string to send.
Résultat void

ServerConnection() public méthode

public ServerConnection ( int port ) : System
port int
Résultat System

Start() public méthode

Start the server. Will listen on port for new clients.
public Start ( ) : void
Résultat void