C# Class VideoCallServer.TCPServer

TCPServer is the Server class. When "StartServer" method is called this Server object tries to connect to a IP Address specified on a port configured. Then the server start listening for client socket requests. As soon as a requestcomes in from any client then a Client Socket Listening thread will be started. That thread is responsible for client communication.
显示文件 Open project: AnthonyNystrom/MobiVU Class Usage Examples

Public Properties

Property Type Description
m_socketListenersList ArrayList

Public Methods

Method Description
GetNumberConnections ( ) : int
StartServer ( ) : void

Method that starts TCP/IP Server.

StopServer ( ) : void

Method that stops the TCP/IP Server.

TCPServer ( IPAddress serverIP ) : System
TCPServer ( IPAddress serverIP, int port ) : System
TCPServer ( IPEndPoint ipNport ) : System
TCPServer ( int iPort ) : System

Constructors.

Private Methods

Method Description
Init ( IPEndPoint ipNport ) : void

Init method that create a server (TCP Listener) Object based on the IP Address and Port information that is passed in.

PurgingThreadStart ( ) : void

Thread method for purging Client Listeneres that are marked for deletion (i.e. clients with socket connection closed). This thead is a low priority thread and sleeps for 10 seconds and then check for any client SocketConnection obects which are obselete and marked for deletion.

ServerThreadStart ( ) : void

TCP/IP Server Thread that is listening for clients.

StopAllSocketListers ( ) : void

Method that stops all clients and clears the list.

Method Details

GetNumberConnections() public method

public GetNumberConnections ( ) : int
return int

StartServer() public method

Method that starts TCP/IP Server.
public StartServer ( ) : void
return void

StopServer() public method

Method that stops the TCP/IP Server.
public StopServer ( ) : void
return void

TCPServer() public method

public TCPServer ( IPAddress serverIP ) : System
serverIP System.Net.IPAddress
return System

TCPServer() public method

public TCPServer ( IPAddress serverIP, int port ) : System
serverIP System.Net.IPAddress
port int
return System

TCPServer() public method

public TCPServer ( IPEndPoint ipNport ) : System
ipNport System.Net.IPEndPoint
return System

TCPServer() public method

Constructors.
public TCPServer ( int iPort ) : System
iPort int
return System

Property Details

m_socketListenersList public_oe property

public ArrayList m_socketListenersList
return ArrayList