C# Class Descent.Messaging.Connection.ClientConnection

A TCP client connected to the host server. When sending a message, it will send only to the server at the other end of the connection.
Inheritance: Connection
Afficher le fichier Open project: nezbo/Descent

Private Properties

Свойство Type Description
MessageReceived void

Méthodes publiques

Méthode Description
ClientConnection ( string ip, int port ) : System

Initializes a new instance of the ClientConnection class. Responsible for client connections to the host/server.

Close ( ) : void

Close the socket connection.

SendString ( string message ) : void

Send a string to the host.

Start ( ) : void

Beging the client connection. Will connect to specified host and begin receiving data.

Private Methods

Méthode Description
MessageReceived ( ClientInfo clientInfo, string message ) : void

Called when a message was received from the connection.

Method Details

ClientConnection() public méthode

Initializes a new instance of the ClientConnection class. Responsible for client connections to the host/server.
public ClientConnection ( string ip, int port ) : System
ip string Ips of server.
port int Port of server.
Résultat System

Close() public méthode

Close the socket connection.
public Close ( ) : void
Résultat void

SendString() public méthode

Send a string to the host.
public SendString ( string message ) : void
message string Message to send.
Résultat void

Start() public méthode

Beging the client connection. Will connect to specified host and begin receiving data.
public Start ( ) : void
Résultat void