C# Class Pdelvo.Minecraft.Proxy.Library.Connection.ProxyConnection

The basic implementation of the IProxyConnection interface
Inheritance: IProxyConnection
Afficher le fichier Open project: pdelvo/Pdelvo.Minecraft.Proxy Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

CloseAsync() public méthode

Asynchronously close this connection
public CloseAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

Dispose() public méthode

Cleans all resources of this connection
public Dispose ( ) : void
Résultat void

InitializeServerAsync() public méthode

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.
Résultat Task

KickUserAsync() public méthode

Asyncronously kicking a client
public KickUserAsync ( string message ) : System.Threading.Tasks.Task
message string The kick message
Résultat System.Threading.Tasks.Task

ProxyConnection() public méthode

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
Résultat System

StartClientListening() public méthode

Start waiting for client packets
public StartClientListening ( ) : void
Résultat void

StartServerListening() public méthode

Start waiting for server packets
public StartServerListening ( ) : void
Résultat void