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
Mostra file Open project: nezbo/Descent

Private Properties

Property Type Description
MessageReceived void

Public Methods

Method 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

Method Description
MessageReceived ( ClientInfo clientInfo, string message ) : void

Called when a message was received from the connection.

Method Details

ClientConnection() public method

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.
return System

Close() public method

Close the socket connection.
public Close ( ) : void
return void

SendString() public method

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

Start() public method

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