Photon Server API Documentation v5.0RC1

Public Member Functions | List of all members
Photon.SocketServer.Rpc.Reflection.OperationDispatcher Class Reference

This class contains functions to dispatch operations. The target function depends on the incoming operation code. All registered methods require the OperationAttribute and the signature public OperationResponse MyMethod(PeerBase peer, OperationRequest request, SendParameters sendParameters);. More...

Public Member Functions

 OperationDispatcher (OperationMethodInfoCache operations, IOperationHandler operationHandler)
 Initializes a new instance of the OperationDispatcher class. More...
 
bool DispatchOperationRequest (PeerBase peer, OperationRequest operationRequest, SendParameters sendParameters, out OperationResponse returnValue)
 The dispatch operation request. More...
 

Detailed Description

This class contains functions to dispatch operations. The target function depends on the incoming operation code. All registered methods require the OperationAttribute and the signature public OperationResponse MyMethod(PeerBase peer, OperationRequest request, SendParameters sendParameters);.

Constructor & Destructor Documentation

◆ OperationDispatcher()

Photon.SocketServer.Rpc.Reflection.OperationDispatcher.OperationDispatcher ( OperationMethodInfoCache  operations,
IOperationHandler  operationHandler 
)
inline

Initializes a new instance of the OperationDispatcher class.

Parameters
operationsThe operations.
operationHandlerThe operation Handler.

Member Function Documentation

◆ DispatchOperationRequest()

bool Photon.SocketServer.Rpc.Reflection.OperationDispatcher.DispatchOperationRequest ( PeerBase  peer,
OperationRequest  operationRequest,
SendParameters  sendParameters,
out OperationResponse  returnValue 
)
inline

The dispatch operation request.

Parameters
peerThe peer.
operationRequestThe operation Request.
sendParametersThe send parameters.
returnValueThe return Value.
Returns
ok or error.