.NET Client Reference
Class Multiplayer
Namespace: PlayerIOClient
Language: C# / .NET
The Player.IO Multiplayer Service
.
Properties | |||
---|---|---|---|
public ServerEndpoint |
If not null, rooms will be created on the development server at the address defined by the server endpoint, instead of using the live Player.IO serveer. If not null, property GameServerEndpointFilter is ignored. |
||
public GameServerEndpointFilterDelegate |
If not null, allows you to filter, rearrange, or completely redefine the game server enpoints. Endpoints are tried one after the other until there is one successful connection to a game server. If DevelopmentServer property is not null, this property is ignored. |
||
public bool |
If true, the multiplayer connections will be encrypted using TLS/SSL. Beaware that this will cause a performance degredation by introducting secure connection negotiation latency. |
||
Methods | |||
public Connection |
Creates a multiplayer room (if it does not exist already) and joins it. |
||
public void |
Creates a multiplayer room (if it does not exist already) and joins it. |
||
public void |
Creates a multiplayer room (if it does not exist already) and joins it. |
||
public string |
Create a multiplayer room on the Player.IO infrastructure |
||
public void |
Create a multiplayer room on the Player.IO infrastructure |
||
public void |
Create a multiplayer room on the Player.IO infrastructure |
||
public void |
Create an multiplayer room on the Player.IO infrastructure |
||
public Connection |
Join a running multiplayer room |
||
public void |
Create an multiplayer room on the Player.IO infrastructure |
||
public void |
List the currently running multiplayer rooms |
||
public void |
List the currently running multiplayer rooms |
||
public RoomInfo[] |
List the currently running multiplayer rooms |
Multiplayer.DevelopmentServer
public ServerEndpoint |
|
If not null, rooms will be created on the development server at the address defined by the server endpoint, instead of using the live Player.IO serveer. If not null, property GameServerEndpointFilter is ignored.
Multiplayer.GameServerEndpointFilter
public GameServerEndpointFilterDelegate |
|
If not null, allows you to filter, rearrange, or completely redefine the game server enpoints. Endpoints are tried one after the other until there is one successful connection to a game server. If DevelopmentServer property is not null, this property is ignored.
Multiplayer.UseSecureConnections
public bool |
|
If true, the multiplayer connections will be encrypted using TLS/SSL. Beaware that this will cause a performance degredation by introducting secure connection negotiation latency.
Multiplayer.CreateJoinRoom
public Connection |
|
Creates a multiplayer room (if it does not exist already) and joins it.
Arguments
string | roomId |
The id of the room you wish to create/join | |
string | roomType |
The name of the room type you wish to run the room as. This value should match one of the [RoomType(...)] attributes of your uploaded code. A room type of 'bounce' is always available. | |
bool | visible |
If the room doesn't exist: Should the room be visible when listing rooms with GetRooms upon creation | |
Dictionary<string, string> | roomData |
If the room doesn't exist: The data to initialize the room with upon creation | |
Dictionary<string, string> | joinData |
Data to send to the room with additional information about the join |
Multiplayer.CreateJoinRoom
public void |
|
Creates a multiplayer room (if it does not exist already) and joins it.
Arguments
string | roomId |
The id of the room you wish to create/join | |
string | roomType |
The name of the room type you wish to run the room as. This value should match one of the [RoomType(...)] attributes of your uploaded code. A room type of 'bounce' is always available. | |
bool | visible |
If the room doesn't exist: Should the room be visible when listing rooms with GetRooms upon creation | |
Dictionary<string, string> | roomData |
If the room doesn't exist: The data to initialize the room with upon creation | |
Dictionary<string, string> | joinData |
Data to send to the room with additional information about the join | |
Callback<Connection> | successCallback |
Callback with a connection into the room that was created |
Multiplayer.CreateJoinRoom
public void |
|
Creates a multiplayer room (if it does not exist already) and joins it.
Arguments
string | roomId |
The id of the room you wish to create/join | |
string | roomType |
The name of the room type you wish to run the room as. This value should match one of the [RoomType(...)] attributes of your uploaded code. A room type of 'bounce' is always available. | |
bool | visible |
If the room doesn't exist: Should the room be visible when listing rooms with GetRooms upon creation | |
Dictionary<string, string> | roomData |
If the room doesn't exist: The data to initialize the room with upon creation | |
Dictionary<string, string> | joinData |
Data to send to the room with additional information about the join | |
Callback<Connection> | successCallback |
Callback with a connection into the room that was created | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs |
Multiplayer.CreateRoom
public string |
|
Create a multiplayer room on the Player.IO infrastructure
Arguments
string | roomId |
The id you wish to assign to your new room - You can use this to connect to the specific room later as long as it still exists | |
string | roomType |
The name of the room type you wish to run the room as. This value should match one of the [RoomType(...)] attributes of your uploaded code. A room type of 'bounce' is always available. | |
bool | visible |
Should the room be visible when listing rooms with GetRooms | |
Dictionary<string, string> | roomData |
The data to initialize the room with, this can be read with ListRooms and changed from the serverside |
Multiplayer.CreateRoom
public void |
|
Create a multiplayer room on the Player.IO infrastructure
Arguments
string | roomId |
The id you wish to assign to your new room - You can use this to connect to the specific room later as long as it still exists | |
string | roomType |
The name of the room type you wish to run the room as. This value should match one of the [RoomType(...)] attributes of your uploaded code. A room type of 'bounce' is always available. | |
bool | visible |
Should the room be visible when listing rooms with GetRooms | |
Dictionary<string, string> | roomData |
The data to initialize the room with, this can be read with ListRooms and changed from the serverside | |
Callback<string> | successCallback |
Callback with the id of the room that was created |
Multiplayer.CreateRoom
public void |
|
Create a multiplayer room on the Player.IO infrastructure
Arguments
string | roomId |
The id you wish to assign to your new room - You can use this to connect to the specific room later as long as it still exists | |
string | roomType |
The name of the room type you wish to run the room as. This value should match one of the [RoomType(...)] attributes of your uploaded code. A room type of 'bounce' is always available. | |
bool | visible |
Should the room be visible when listing rooms with GetRooms | |
Dictionary<string, string> | roomData |
The data to initialize the room with, this can be read with ListRooms and changed from the serverside | |
Callback<string> | successCallback |
Callback with the id of the room that was created | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs during the room creation. |
Multiplayer.JoinRoom
public void |
|
Create an multiplayer room on the Player.IO infrastructure
Arguments
string | roomId |
The id of the room you wish to connect to | |
Dictionary<string, string> | joinData |
Data to send to the room with additional information about the join | |
Callback<Connection> | successCallback |
Callback with a connection into the room |
Multiplayer.JoinRoom
public Connection |
|
Join a running multiplayer room
Arguments
string | roomId |
The id of the room you wish to connect to | |
Dictionary<string, string> | joinData |
Data to send to the room with additional information about the join |
Multiplayer.JoinRoom
public void |
|
Create an multiplayer room on the Player.IO infrastructure
Arguments
string | roomId |
The id of the room you wish to connect to | |
Dictionary<string, string> | joinData |
Data to send to the room with additional information about the join | |
Callback<Connection> | successCallback |
Callback with a connection into the room | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs |
Multiplayer.ListRooms
public void |
|
List the currently running multiplayer rooms
Arguments
string | roomType |
The type of room you wish to list | |
Dictionary<string, string> | searchCriteria |
Only rooms with the same values in their roomdata will be returned. To use search criteria you must first define searchable properties in the Multiplayer Settings page in the Control Panel for your game. | |
int | resultLimit |
The maximum amount of rooms you want to receive. Use 0 for 'as many as possible'. | |
int | resultOffset |
The offset into the list you wish | |
Callback<RoomInfo[]> | successCallback |
Callback with a list of rooms matching the search criteria |
Multiplayer.ListRooms
public void |
|
List the currently running multiplayer rooms
Arguments
string | roomType |
The type of room you wish to list | |
Dictionary<string, string> | searchCriteria |
Only rooms with the same values in their roomdata will be returned. To use search criteria you must first define searchable properties in the Multiplayer Settings page in the Control Panel for your game. | |
int | resultLimit |
The maximum amount of rooms you want to receive. Use 0 for 'as many as possible'. | |
int | resultOffset |
The offset into the list you wish | |
Callback<RoomInfo[]> | successCallback |
Callback with a list of rooms matching the search criteria | |
Callback<PlayerIOError> | errorCallback |
Callback that will be called instead of successCallback if an error occurs |
Multiplayer.ListRooms
public RoomInfo[] |
|
List the currently running multiplayer rooms
Arguments
string | roomType |
The type of room you wish to list | |
Dictionary<string, string> | searchCriteria |
Only rooms with the same values in their roomdata will be returned. To use search criteria you must first define searchable properties in the Multiplayer Settings page in the Control Panel for your game. | |
int | resultLimit |
The maximum amount of rooms you want to receive. Use 0 for 'as many as possible'. | |
int | resultOffset |
The offset into the list you wish |