C# Класс Automobile.Communication.Tcp.TcpServerCommunicator

A server communicator
Наследование: TcpCommunicator
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AcceptClient System.Net.Sockets.TcpClient
AcceptMultiple void
TcpServerCommunicator System.Net

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

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

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

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

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

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

Close the stream
public Close ( ) : void
Результат void

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

Prepare the stream for single connection reading and writing
public Initialize ( ) : void
Результат void

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

Recieve multiple connections, each connection is passed to the callback in a new thread. Does not return.
public Initialize ( ConnectionCallback callback ) : void
callback ConnectionCallback
Результат void

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

Listens for a single connection on a given port
public TcpServerCommunicator ( int port ) : System.Net
port int Port to listen on
Результат System.Net