Photon Server API Documentation v5.0RC1

Public Member Functions | Properties | List of all members
Photon.SocketServer.IEventData Interface Reference

The implementation class contains data that is sent to clients with PeerBase.SendEvent(IEventData,SendParameters). Implementors are EventData and SerializedEventData. More...

Inheritance diagram for Photon.SocketServer.IEventData:
Photon.SocketServer.EventData Photon.SocketServer.SerializedEventData

Public Member Functions

byte[] Serialize (IRpcProtocol protocol, SerializeSetup setup)
 Serializes the event data. More...
 

Properties

byte Code [get]
 Gets Code. More...
 
object this[byte parameterKey] [get, set]
 Gets or sets the paramter associated with the specified key. More...
 
Dictionary< byte, object > Parameters [get]
 Gets the event parameters that will be sent to the client. More...
 

Detailed Description

The implementation class contains data that is sent to clients with PeerBase.SendEvent(IEventData,SendParameters). Implementors are EventData and SerializedEventData.

Member Function Documentation

◆ Serialize()

byte [] Photon.SocketServer.IEventData.Serialize ( IRpcProtocol  protocol,
SerializeSetup  setup 
)

Serializes the event data.

Parameters
protocolThe protocol used to serialize the event data.
setup
Returns
A byte array that contains the serialized event data parameters and the event code.

Implemented in Photon.SocketServer.EventData, and Photon.SocketServer.SerializedEventData.

Property Documentation

◆ Code

byte Photon.SocketServer.IEventData.Code
get

Gets Code.

◆ Parameters

Dictionary<byte, object> Photon.SocketServer.IEventData.Parameters
get

Gets the event parameters that will be sent to the client.

◆ this[byte parameterKey]

object Photon.SocketServer.IEventData.this[byte parameterKey]
getset

Gets or sets the paramter associated with the specified key.

Parameters
parameterKeyThe key of the parameter to get or set.
Returns
The parameter associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new paramter with the specified key.
Exceptions
System.NullReferenceExceptionThe Parameters property has not been initialized.