PlayerIO

The fastest way to build online games without breaking a sweat.

Multiplayer Reference

Multiplayer  class documentationClass Web

Namespace: PlayerIO.GameLibrary
Language: C# / .NET

An easy way to communicate with servers and services outside Player.IO via http requests

Only paid Player.IO accounts can call these methods on the live servers, due to security concerns. They are always avaliable on the local development server however.

You can fully develop your game locally using these methods without restrictions, and only upgrade to a paid account when you need to deploy your game to the live servers

Below is an example of using the Get() method to download the contents of a web page in the GameStarted() method of a multiplayer room.

Methods

 
public void
Get (string url, Dictionary<string, string> headers, Callback<HttpResponse> successCallback)

Perform a HTTP Get request.

public void
Get (string url, Dictionary<string, string> headers, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Get request.

public void
Get (string url, Callback<HttpResponse> successCallback)

Perform a HTTP Get request.

public void
Get (string url, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Get request.

public void
Post (string url, Dictionary<string, string> post, Dictionary<string, string> headers, Callback<HttpResponse> successCallback)

Perform a HTTP Post request.

public void
Post (string url, Dictionary<string, string> post, Dictionary<string, string> headers, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Post request.

public void
Post (string url, Dictionary<string, string> post, Callback<HttpResponse> successCallback)

Perform a HTTP Post request.

public void
Post (string url, Dictionary<string, string> post, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Post request.

Web.Get

public void
Get (string url, Dictionary<string, string> headers, Callback<HttpResponse> successCallback)

Perform a HTTP Get request.

Arguments

string url
The url to request, including querystring arguments (if any)
Dictionary<string, string> headers
A collection of headers to set on the request (if any)
Callback<HttpResponse> successCallback
Callback with a stream of the returned page

Web.Get

public void
Get (string url, Dictionary<string, string> headers, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Get request.

Arguments

string url
The url to request, including querystring arguments (if any)
Dictionary<string, string> headers
A collection of headers to set on the request (if any)
Callback<HttpResponse> successCallback
Callback with a stream of the returned page
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the request.

Web.Get

public void
Get (string url, Callback<HttpResponse> successCallback)

Perform a HTTP Get request.

Arguments

string url
The url to request, including querystring arguments (if any)
Callback<HttpResponse> successCallback
Callback with a stream of the returned page

Web.Get

public void
Get (string url, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Get request.

Arguments

string url
The url to request, including querystring arguments (if any)
Callback<HttpResponse> successCallback
Callback with a stream of the returned page
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the request.

Web.Post

public void
Post (string url, Dictionary<string, string> post, Dictionary<string, string> headers, Callback<HttpResponse> successCallback)

Perform a HTTP Post request.

Arguments

string url
The url to request, including querystring arguments (if any)
Dictionary<string, string> post
The values to post to the given url
Dictionary<string, string> headers
A collection of headers to set on the request (if any)
Callback<HttpResponse> successCallback
Callback with a stream of the returned page

Web.Post

public void
Post (string url, Dictionary<string, string> post, Dictionary<string, string> headers, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Post request.

Arguments

string url
The url to request, including querystring arguments (if any)
Dictionary<string, string> post
The values to post to the given url
Dictionary<string, string> headers
A collection of headers to set on the request (if any)
Callback<HttpResponse> successCallback
Callback with a stream of the returned page
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the request.

Web.Post

public void
Post (string url, Dictionary<string, string> post, Callback<HttpResponse> successCallback)

Perform a HTTP Post request.

Arguments

string url
The url to request, including querystring arguments (if any)
Dictionary<string, string> post
The values to post to the given url
Callback<HttpResponse> successCallback
Callback with a stream of the returned page

Web.Post

public void
Post (string url, Dictionary<string, string> post, Callback<HttpResponse> successCallback, Callback<PlayerIOError> errorCallback)

Perform a HTTP Post request.

Arguments

string url
The url to request, including querystring arguments (if any)
Dictionary<string, string> post
The values to post to the given url
Callback<HttpResponse> successCallback
Callback with a stream of the returned page
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the request.