C# Class Automobile.Communication.Tcp.TcpServerCommunicator

A server communicator
Inheritance: TcpCommunicator
Show file Open project: vistaprint/automobile Class Usage Examples

Private Properties

Property Type Description
AcceptClient System.Net.Sockets.TcpClient
AcceptMultiple void
TcpServerCommunicator System.Net

Public Methods

Method Description
Close ( ) : void

Close the stream

Initialize ( ) : void

Prepare the stream for single connection reading and writing

Initialize ( ConnectionCallback callback ) : void

Recieve multiple connections, each connection is passed to the callback in a new thread. Does not return.

TcpServerCommunicator ( int port ) : System.Net

Listens for a single connection on a given port

Private Methods

Method Description
AcceptClient ( ) : TcpClient

Accept a client

AcceptMultiple ( ConnectionCallback callback ) : void

Recieve multiple connections, each connection is passed to the callback in a new thread. Does not return.

TcpServerCommunicator ( int port, TcpClient client ) : System.Net

Listens for a single connection on a given port

Method Details

Close() public method

Close the stream
public Close ( ) : void
return void

Initialize() public method

Prepare the stream for single connection reading and writing
public Initialize ( ) : void
return void

Initialize() public method

Recieve multiple connections, each connection is passed to the callback in a new thread. Does not return.
public Initialize ( ConnectionCallback callback ) : void
callback ConnectionCallback
return void

TcpServerCommunicator() public method

Listens for a single connection on a given port
public TcpServerCommunicator ( int port ) : System.Net
port int Port to listen on
return System.Net