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

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

Private Properties

Property Type Description
PromoteConnection void
ReadConfig void
ReceiveClientsAsync void
RemoveConnection void

Public Methods

Method 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

Method Description
PromoteConnection ( ProxyConnection proxyConnection ) : void
ReadConfig ( ) : void
ReceiveClientsAsync ( ) : void
RemoveConnection ( ProxyConnection proxyConnection ) : void

Method Details

CheckUserAccountAsync() public method

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
return Task

Dispose() public method

Close all active connections and free resources synchronously
public Dispose ( ) : void
return void

GetServerEndPoint() public method

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.
return RemoteServerInfo

GetServerVersion() public method

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.
return void

OnlineModeEnabled() public method

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
return bool

ProxyServer() public method

Creates a new instance of the ProxyServer class.
public ProxyServer ( ) : System
return System

Start() public method

Start listening for new users.
public Start ( ) : void
return void

StopAsync() public method

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