.NET Client Reference
Class Connection
Namespace: PlayerIOClient
Language: C# / .NET
A connection into a running Player.IO multiplayer room
Here is an example of joining a multiplayer room and listening to all messages
Properties | |||
---|---|---|---|
public bool |
Is the connection currently connected to a remote host? |
||
Methods | |||
public void |
Add a disconnect handler to the OnDisconnect event |
||
public void |
Add a message handler to the OnMessage event |
||
public void |
Disconnect from the game room |
||
public void |
Send a message to the connected client |
||
public void |
Send a message to the connected client without first having to construct a Message object. |
Connection.Connected
public bool |
|
Is the connection currently connected to a remote host?
Connection.AddOnDisconnect
public void |
|
Add a disconnect handler to the OnDisconnect event
Arguments
DisconnectEventHandler | disconnectHandler |
Connection.AddOnMessage
public void |
|
Add a message handler to the OnMessage event
Arguments
MessageReceivedEventHandler | onMessageHandler |
Connection.Disconnect
public void |
|
Disconnect from the game room
Connection.Send
public void |
|
Send a message to the connected client
Arguments
Message | message |
The message to send |
Connection.Send
public void |
|
Send a message to the connected client without first having to construct a Message object.
Arguments
string | type |
The type of message to send | |
params object[] | parameters |
The data to put in the message to send |