C# Class Pdelvo.Minecraft.Proxy.Library.ProxyServer

The base implementation of a proxy server.
Inheritance: IProxyServer
Afficher le fichier Open project: pdelvo/Pdelvo.Minecraft.Proxy Class Usage Examples

Private Properties

Свойство Type Description
PromoteConnection void
ReadConfig void
ReceiveClientsAsync void
RemoveConnection void

Méthodes publiques

Méthode Description
CheckUserAccountAsync ( ProxyConnection proxyConnection, string hash ) : Task

checks if a user account is valid using plugins and the minecraft.net services

Dispose ( ) : void

Close all active connections and free resources synchronously

GetServerEndPoint ( IProxyConnection proxyConnection ) : RemoteServerInfo

Get a new server end point for a given proxy connection to.

GetServerVersion ( IProxyConnection proxyConnection, RemoteServerInfo serverEndPoint ) : void

Get the minecraft protocol server of a given minecraft server.

OnlineModeEnabled ( IProxyConnection proxyConnection ) : bool

Returns true if the online mode is enabled for a specific user or not.

ProxyServer ( ) : System

Creates a new instance of the ProxyServer class.

Start ( ) : void

Start listening for new users.

StopAsync ( ) : System.Threading.Tasks.Task

Close all active connections and free resources asynchronously

Private Methods

Méthode Description
PromoteConnection ( ProxyConnection proxyConnection ) : void
ReadConfig ( ) : void
ReceiveClientsAsync ( ) : void
RemoveConnection ( ProxyConnection proxyConnection ) : void

Method Details

CheckUserAccountAsync() public méthode

checks if a user account is valid using plugins and the minecraft.net services
public CheckUserAccountAsync ( ProxyConnection proxyConnection, string hash ) : Task
proxyConnection Pdelvo.Minecraft.Proxy.Library.Connection.ProxyConnection The proxy server which should be checked.
hash string The 'serverId' hash
Résultat Task

Dispose() public méthode

Close all active connections and free resources synchronously
public Dispose ( ) : void
Résultat void

GetServerEndPoint() public méthode

Get a new server end point for a given proxy connection to.
public GetServerEndPoint ( IProxyConnection proxyConnection ) : RemoteServerInfo
proxyConnection IProxyConnection The proxy connection which need a new server connection.
Résultat RemoteServerInfo

GetServerVersion() public méthode

Get the minecraft protocol server of a given minecraft server.
public GetServerVersion ( IProxyConnection proxyConnection, RemoteServerInfo serverEndPoint ) : void
proxyConnection IProxyConnection The connection this server relates to.
serverEndPoint RemoteServerInfo The current version of the Remote server info.
Résultat void

OnlineModeEnabled() public méthode

Returns true if the online mode is enabled for a specific user or not.
public OnlineModeEnabled ( IProxyConnection proxyConnection ) : bool
proxyConnection IProxyConnection The proxy connection which should be checked
Résultat bool

ProxyServer() public méthode

Creates a new instance of the ProxyServer class.
public ProxyServer ( ) : System
Résultat System

Start() public méthode

Start listening for new users.
public Start ( ) : void
Résultat void

StopAsync() public méthode

Close all active connections and free resources asynchronously
public StopAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task