C# 클래스 MarsRover.TCPServer

파일 보기 프로젝트 열기: jpadillak/Concordia_Capstone2013-14

공개 메소드들

메소드 설명
GetClientId ( TcpClient client ) : int

Get the client ID of the specified client.

GetConnectedClients ( ) : ArrayList

Get all connected clients to the server

PrintAllClientInfo ( ) : void

Print all client information

PrintClientInfo ( TcpClient client ) : void

Print the client information

SendData ( object client, byte message, int size ) : void

Send data to the specified client.

TCPServer ( int Port, TransmittedCBType aTransmittedCBHandler, ReceivedCBType aReceivedCBHandler, ClientFoundCBType aClientFoundCBHandler, ClientLostCBType aClientLostCBHandler ) : System

TCP server constuctor, this instanciate the server on the specified port.

비공개 메소드들

메소드 설명
ReceiveThreadHandler ( object client ) : void

Handles the data received from a client.

ServerListeningThreadHandler ( ) : void

Internal Listen thread, each time a server is created a listening thread is also created.

메소드 상세

GetClientId() 공개 메소드

Get the client ID of the specified client.
public GetClientId ( TcpClient client ) : int
client System.Net.Sockets.TcpClient
리턴 int

GetConnectedClients() 공개 메소드

Get all connected clients to the server
public GetConnectedClients ( ) : ArrayList
리턴 System.Collections.ArrayList

PrintAllClientInfo() 공개 메소드

Print all client information
public PrintAllClientInfo ( ) : void
리턴 void

PrintClientInfo() 공개 메소드

Print the client information
public PrintClientInfo ( TcpClient client ) : void
client System.Net.Sockets.TcpClient
리턴 void

SendData() 공개 메소드

Send data to the specified client.
public SendData ( object client, byte message, int size ) : void
client object
message byte
size int
리턴 void

TCPServer() 공개 메소드

TCP server constuctor, this instanciate the server on the specified port.
public TCPServer ( int Port, TransmittedCBType aTransmittedCBHandler, ReceivedCBType aReceivedCBHandler, ClientFoundCBType aClientFoundCBHandler, ClientLostCBType aClientLostCBHandler ) : System
Port int
aTransmittedCBHandler TransmittedCBType
aReceivedCBHandler ReceivedCBType
aClientFoundCBHandler ClientFoundCBType
aClientLostCBHandler ClientLostCBType
리턴 System