C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
m_socketListenersList ArrayList

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

GetNumberConnections() публичный Метод

public GetNumberConnections ( ) : int
Результат int

StartServer() публичный Метод

Method that starts TCP/IP Server.
public StartServer ( ) : void
Результат void

StopServer() публичный Метод

Method that stops the TCP/IP Server.
public StopServer ( ) : void
Результат void

TCPServer() публичный Метод

public TCPServer ( IPAddress serverIP ) : System
serverIP System.Net.IPAddress
Результат System

TCPServer() публичный Метод

public TCPServer ( IPAddress serverIP, int port ) : System
serverIP System.Net.IPAddress
port int
Результат System

TCPServer() публичный Метод

public TCPServer ( IPEndPoint ipNport ) : System
ipNport System.Net.IPEndPoint
Результат System

TCPServer() публичный Метод

Constructors.
public TCPServer ( int iPort ) : System
iPort int
Результат System

Описание свойств

m_socketListenersList публичное свойство

public ArrayList m_socketListenersList
Результат ArrayList