C# Класс Pdelvo.Minecraft.Proxy.Library.Connection.ProxyConnection

The basic implementation of the IProxyConnection interface
Наследование: IProxyConnection
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CloseAsync ( ) : System.Threading.Tasks.Task

Asynchronously close this connection

Dispose ( ) : void

Cleans all resources of this connection

InitializeServerAsync ( RemoteServerInfo serverEndPoint ) : Task

Asynchronously initialize the server side of this connection

KickUserAsync ( string message ) : System.Threading.Tasks.Task

Asyncronously kicking a client

ProxyConnection ( Socket networkSocket, ProxyServer server ) : System

Creates a new instance of the ProxyConnection class with the remote socket of the client and the ProxyServer this connection should belong to.

StartClientListening ( ) : void

Start waiting for client packets

StartServerListening ( ) : void

Start waiting for server packets

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

Метод Описание
ClientConnectionLost ( object sender, EventArgs e ) : void
ClientPacketReceived ( object sender, PacketReceivedEventArgs args ) : void
HandleClient ( ) : void
InitializeServerAsync ( ) : Task
OnConnectionLost ( ) : void
ServerConnectionLost ( object sender, EventArgs e ) : void
ServerPacketReceived ( object sender, PacketReceivedEventArgs args ) : void
UnregisterServer ( ) : void

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

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

Asynchronously close this connection
public CloseAsync ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

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

Cleans all resources of this connection
public Dispose ( ) : void
Результат void

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

Asynchronously initialize the server side of this connection
public InitializeServerAsync ( RemoteServerInfo serverEndPoint ) : Task
serverEndPoint RemoteServerInfo Information of the new server this connection should connect to.
Результат Task

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

Asyncronously kicking a client
public KickUserAsync ( string message ) : System.Threading.Tasks.Task
message string The kick message
Результат System.Threading.Tasks.Task

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

Creates a new instance of the ProxyConnection class with the remote socket of the client and the ProxyServer this connection should belong to.
public ProxyConnection ( Socket networkSocket, ProxyServer server ) : System
networkSocket Socket The network socket of the network client
server ProxyServer The proxy server this connection belongs to
Результат System

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

Start waiting for client packets
public StartClientListening ( ) : void
Результат void

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

Start waiting for server packets
public StartServerListening ( ) : void
Результат void