Property | Type | Description | |
---|---|---|---|
natComplete | bool |
Method | Description | |
---|---|---|
GetHosts ( string host, ushort pageNumber, Action |
This method requests all of the hosts from the master server
|
|
PullNatRequest ( string ip, ushort port, ushort internalPort, string requestHost, ushort requestPort ) : void |
This method is used on the server to attempt to connect through the NAT hole punch server to the client
|
|
RegisterNat ( CrossPlatformUDP socket, ushort port, string proxyHost, ushort proxyPort = PORT ) : void |
This method is used to allow a server to register itself with the NAT hole punching server
|
|
RegisterNatRequest ( string ip, ushort port, ushort internalPort ) : void | ||
RegisterServer ( string host, ushort port, int maxPlayers, string name, string gameType = "", string comment = "", string password = "", string sceneName = "" ) : void |
This method is used to register a server to the master server to be retreived by clients
|
|
RequestNat ( CrossPlatformUDP socket, ushort port, string requestHost, ushort requestPort, string proxyHost, ushort proxyPort = PORT ) : bool |
This method is used on the client to attempt to connect to the server through the NAT hole punch server
|
|
SetIp ( string ip ) : void | ||
UnRegisterServer ( string host, ushort port ) : void |
This method is used to manually unregister a server. If a server aborts the master server will automatically remove it
|
|
UpdateServer ( string host, ushort port, int playerCount ) : void |
This method is used to update the current player count on the master server for this server
|
Method | Description | |
---|---|---|
Awake ( ) : void | ||
GetHostsRequestToClient ( |
||
GetHostsRequestToServer ( |
||
OnApplicationQuit ( ) : void | ||
PingHosts ( ) : void | ||
PingRecieved ( string ip ) : void | ||
RegisterServerRequest ( |
||
Request ( string host, Action |
||
Start ( ) : void | ||
StartServer ( ) : void |
This method is called when the host server button is clicked
|
|
UnRegisterServerRequest ( |
||
UpdateServerRequest ( |
public static GetHosts ( string host, ushort pageNumber, Action |
||
host | string | The host of the master server |
pageNumber | ushort | This is the page number (starting from 0). So if you want to get entries 0-n then you will pass 0, if you want n-n+n then pass 1 |
callback | Action |
This is the method that will be called once the master server responds with the host list |
return | void |
public PullNatRequest ( string ip, ushort port, ushort internalPort, string requestHost, ushort requestPort ) : void | ||
ip | string | This is the ip address of the NAT hole punch server |
port | ushort | This is the port number of the NAT hole punch server |
internalPort | ushort | This is the internal port of the client that this server is trying to communicate with |
requestHost | string | This is the client host address that this server is trying to communicate with |
requestPort | ushort | This is the client port number that this server is trying to communicate with |
return | void |
public static RegisterNat ( CrossPlatformUDP socket, ushort port, string proxyHost, ushort proxyPort = PORT ) : void | ||
socket | CrossPlatformUDP | This is the socket that is being used for the communication with the clients |
port | ushort | The port number that is being used for this server |
proxyHost | string | The ip address of the the NAT hole punching (router) server |
proxyPort | ushort | The port number for the NAT hole punch server |
return | void |
public RegisterNatRequest ( string ip, ushort port, ushort internalPort ) : void | ||
ip | string | |
port | ushort | |
internalPort | ushort | |
return | void |
public static RegisterServer ( string host, ushort port, int maxPlayers, string name, string gameType = "", string comment = "", string password = "", string sceneName = "" ) : void | ||
host | string | The master server host address |
port | ushort | The port that this server will be running on |
maxPlayers | int | The maximum amount of players allowed on this server |
name | string | The name for this server |
gameType | string | The type of game for this server (ie. deathmatch, capture the flag, etc.) |
comment | string | The comment for this server (usually user populated for loading screens) |
password | string | The password for this server |
sceneName | string | The scene name that this server is currently on |
return | void |
public static RequestNat ( CrossPlatformUDP socket, ushort port, string requestHost, ushort requestPort, string proxyHost, ushort proxyPort = PORT ) : bool | ||
socket | CrossPlatformUDP | This is the socket that is being used for the communication with the server |
port | ushort | This is the port number that this client is bound to |
requestHost | string | This is the host address of the server that this client is trying to connect to |
requestPort | ushort | This is the host port of the server that this client is trying to connect to |
proxyHost | string | This is the NAT hole punch server host address |
proxyPort | ushort | This is the NAT hole punch server port number |
return | bool |
public static UnRegisterServer ( string host, ushort port ) : void | ||
host | string | The host of the master server |
port | ushort | The port that this server was running on |
return | void |
public static UpdateServer ( string host, ushort port, int playerCount ) : void | ||
host | string | The host of the master server |
port | ushort | The port number that this server is running on |
playerCount | int | The current player count for this server |
return | void |