Photon Server API

Static Public Member Functions | List of all members
Photon.SocketServer.PeerHelper Class Reference

This class provides access to some internal members of PeerBase and S2SPeerBase In general these methods are indended for testing. More...

Static Public Member Functions

static void InvokeOnEvent (S2SPeerBase peer, IEventData eventData, SendParameters sendParameters)
 Invokes S2SPeerBase.OnEvent. This method is useful for testing. More...
 
static void InvokeOnMessage (PeerBase peer, OperationResponse operationResponse, SendParameters sendParameters)
 
static void InvokeOnOperationRequest (PeerBase peer, OperationRequest operationRequest, SendParameters sendParameters)
 Invokes PeerBase.OnOperationRequest. This method is useful for testing. More...
 
static void InvokeOnOperationResponse (S2SPeerBase peer, OperationResponse operationResponse, SendParameters sendParameters)
 Invokes S2SPeerBase.OnOperationResponse. This method is useful for testing. More...
 
static void SimulateDisconnect (PeerBase peer)
 This method simlates a disconnect. This method is useful for testing. More...
 
static void SimulateReceive (PeerBase peer, byte[] data, SendParameters sendParameters)
 This method simulates that data was received from a client. More...
 
static void SimulateOnInit (IPhotonPeer nativePeer, byte[] data, byte channelCount)
 

Detailed Description

This class provides access to some internal members of PeerBase and S2SPeerBase In general these methods are indended for testing.

Member Function Documentation

◆ InvokeOnEvent()

static void Photon.SocketServer.PeerHelper.InvokeOnEvent ( S2SPeerBase  peer,
IEventData  eventData,
SendParameters  sendParameters 
)
inlinestatic

Invokes S2SPeerBase.OnEvent. This method is useful for testing.

Parameters
peerThe server peer.
eventDataThe event Data.
sendParametersThe send Parameters.

◆ InvokeOnMessage()

static void Photon.SocketServer.PeerHelper.InvokeOnMessage ( PeerBase  peer,
OperationResponse  operationResponse,
SendParameters  sendParameters 
)
inlinestatic

◆ InvokeOnOperationRequest()

static void Photon.SocketServer.PeerHelper.InvokeOnOperationRequest ( PeerBase  peer,
OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inlinestatic

Invokes PeerBase.OnOperationRequest. This method is useful for testing.

Parameters
peerThe peer.
operationRequestThe operation request.
sendParametersThe send Parameters.

◆ InvokeOnOperationResponse()

static void Photon.SocketServer.PeerHelper.InvokeOnOperationResponse ( S2SPeerBase  peer,
OperationResponse  operationResponse,
SendParameters  sendParameters 
)
inlinestatic

Invokes S2SPeerBase.OnOperationResponse. This method is useful for testing.

Parameters
peerThe server peer.
operationResponseThe operation response.
sendParametersThe send Parameters.

◆ SimulateDisconnect()

static void Photon.SocketServer.PeerHelper.SimulateDisconnect ( PeerBase  peer)
inlinestatic

This method simlates a disconnect. This method is useful for testing.

Parameters
peerThe disconnected peer.

◆ SimulateOnInit()

static void Photon.SocketServer.PeerHelper.SimulateOnInit ( IPhotonPeer  nativePeer,
byte[]  data,
byte  channelCount 
)
inlinestatic

◆ SimulateReceive()

static void Photon.SocketServer.PeerHelper.SimulateReceive ( PeerBase  peer,
byte[]  data,
SendParameters  sendParameters 
)
inlinestatic

This method simulates that data was received from a client.

Parameters
peerThe peer.
dataThe received data.
sendParametersThe send Options.