C# Class SteamDroidServer.Networking.Connection

Connection connects to a remote host and handles the sending and receiving of data
Show file Open project: FlyingPie/SteamDroid

Public Methods

Method Description
Connect ( String ip, int port ) : bool

Connects to the specified ip and port

Connection ( ) : System
Connection ( Socket socket ) : System
Disconnect ( ) : void

Disconnects from the host

Send ( ) : bool

Sends the specified message to the host, parameterized

Send ( String data ) : bool

Sends the specified message to the host

SendSynchronous ( String data ) : String

Sends the specified message to the host and waits for a response

StartListener ( ) : void

Starts the connection thread

Private Methods

Method Description
Listen ( ) : void

Listens for incoming messages and fires and event on data

Method Details

Connect() public method

Connects to the specified ip and port
public Connect ( String ip, int port ) : bool
ip String The ip to connect to
port int The port to use
return bool

Connection() public method

public Connection ( ) : System
return System

Connection() public method

public Connection ( Socket socket ) : System
socket Socket
return System

Disconnect() public method

Disconnects from the host
public Disconnect ( ) : void
return void

Send() public method

Sends the specified message to the host, parameterized
public Send ( ) : bool
return bool

Send() public method

Sends the specified message to the host
public Send ( String data ) : bool
data String The message to send
return bool

SendSynchronous() public method

Sends the specified message to the host and waits for a response
public SendSynchronous ( String data ) : String
data String The data to send
return String

StartListener() public method

Starts the connection thread
public StartListener ( ) : void
return void