C# Class SRPClient.NetworkManager

Mostrar archivo Open project: SleeplessByte/lidgren-srp6a Class Usage Examples

Public Methods

Method Description
AsyncConnect ( String username, String password ) : void

Starts connecting with username and password

AsyncFindNearbyServer ( ) : void

Async finds new server

AsyncFindNearbyServer ( System.Boolean newServer ) : void

Starts finding a nearby server asynchronously

Authenticate ( NetConnection connection, String username, String password ) : void

Starts authenticating the user

Connect ( IPEndPoint endPoint ) : void

Connects to an endpoint

Disconnect ( String message ) : void

Disconnects client and resets connecting status

Initialize ( ) : void

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.

Loop ( ) : void

SetupLobby ( ) : void

Setups lobby events

Private Methods

Method Description
CancelConnect ( ) : void

Cancells any running connections

Game_Exiting ( object sender, EventArgs e ) : void

On Game Exiting, stop server

NetLobby_OnDenied ( string reason ) : void

Runs when handshake is denied

NetLobby_OnError ( string reason ) : void

Runs when handshake error occrus

NetLobby_OnExpired ( string reason ) : void

Runs when handshake expired

NetLobby_OnSucces ( string reason ) : void

Runs when lobby succes

NetworkManager ( ) : System

Constructor for this component

SetPlayerId ( String id ) : void

When player protocol has got user info, set the id

SetStep ( AuthenticationStatus status ) : void

Sets authentication setp

_foundAServerCallbackMethod ( object sender, EventArgs e ) : void

Event handler for completion of server retrieval

Method Details

AsyncConnect() public method

Starts connecting with username and password
public AsyncConnect ( String username, String password ) : void
username String username
password String password
return void

AsyncFindNearbyServer() public method

Async finds new server
public AsyncFindNearbyServer ( ) : void
return void

AsyncFindNearbyServer() public method

Starts finding a nearby server asynchronously
public AsyncFindNearbyServer ( System.Boolean newServer ) : void
newServer System.Boolean
return void

Authenticate() public method

Starts authenticating the user
public Authenticate ( NetConnection connection, String username, String password ) : void
connection Lidgren.Network.NetConnection
username String
password String
return void

Connect() public method

Connects to an endpoint
public Connect ( IPEndPoint endPoint ) : void
endPoint System.Net.IPEndPoint
return void

Disconnect() public method

Disconnects client and resets connecting status
public Disconnect ( String message ) : void
message String message to disconnect with
return void

Initialize() public method

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.
public Initialize ( ) : void
return void

Loop() public method

public Loop ( ) : void
return void

SetupLobby() public method

Setups lobby events
public SetupLobby ( ) : void
return void