Photon Server API
Public Member Functions | Static Public Member Functions | List of all members
Photon.MmoDemo.Server.MmoInitialOperationHandler Class Reference

–°lient's Peer.CurrentOperationHandler immediately after connecting. More...

Inheritance diagram for Photon.MmoDemo.Server.MmoInitialOperationHandler:
Photon.SocketServer.Rpc.IOperationHandler

Public Member Functions

 MmoInitialOperationHandler (MmoPeer peer)
 
OperationResponse OperationCreateWorld (PeerBase peer, OperationRequest request)
 Expects operation CreateWorld and adds a new World to the WorldCache. More...
 
OperationResponse OperationEnterWorld (PeerBase peer, OperationRequest request, SendParameters sendParameters)
 Expects operation EnterWorld and creates a new MmoActor with a new Item as avatar and a new MmoClientInterestArea. More...
 
void OnDisconnect (PeerBase peer)
 IOperationHandler implementation. Stops any further operation handling and disposes the peer's resources. More...
 
void OnDisconnectByOtherPeer (PeerBase peer)
 IOperationHandler implementation. Disconnects the peer. More...
 
OperationResponse OnOperationRequest (PeerBase peer, OperationRequest operationRequest, SendParameters sendParameters)
 IOperationHandler implementation. More...
 

Static Public Member Functions

static OperationResponse InvalidOperation (OperationRequest request)
 Handles all operations that are not allowed before operation EnterWorld is called. More...
 
static OperationResponse OperationRadarSubscribe (PeerBase peer, OperationRequest request, SendParameters sendParameters)
 Expects operation RadarSubscribe and subscribes the peer to the Radar. Publishes an OperationResponse with error code ReturnCode.Ok if successful. More...
 

Detailed Description

–°lient's Peer.CurrentOperationHandler immediately after connecting.

Constructor & Destructor Documentation

Photon.MmoDemo.Server.MmoInitialOperationHandler.MmoInitialOperationHandler ( MmoPeer  peer)
inline

Member Function Documentation

static OperationResponse Photon.MmoDemo.Server.MmoInitialOperationHandler.InvalidOperation ( OperationRequest  request)
inlinestatic

Handles all operations that are not allowed before operation EnterWorld is called.

void Photon.MmoDemo.Server.MmoInitialOperationHandler.OnDisconnect ( PeerBase  peer)
inline

IOperationHandler implementation. Stops any further operation handling and disposes the peer's resources.

Implements Photon.SocketServer.Rpc.IOperationHandler.

void Photon.MmoDemo.Server.MmoInitialOperationHandler.OnDisconnectByOtherPeer ( PeerBase  peer)
inline

IOperationHandler implementation. Disconnects the peer.

OperationResponse Photon.MmoDemo.Server.MmoInitialOperationHandler.OnOperationRequest ( PeerBase  peer,
OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

IOperationHandler implementation.

Implements Photon.SocketServer.Rpc.IOperationHandler.

OperationResponse Photon.MmoDemo.Server.MmoInitialOperationHandler.OperationCreateWorld ( PeerBase  peer,
OperationRequest  request 
)
inline

Expects operation CreateWorld and adds a new World to the WorldCache.

OperationResponse Photon.MmoDemo.Server.MmoInitialOperationHandler.OperationEnterWorld ( PeerBase  peer,
OperationRequest  request,
SendParameters  sendParameters 
)
inline

Expects operation EnterWorld and creates a new MmoActor with a new Item as avatar and a new MmoClientInterestArea.

The MmoActor becomes the new Peer.CurrentOperationHandler. If another MmoActor with the same name exists he is disconnected. An OperationResponse with error code ReturnCode.Ok is published on success.

static OperationResponse Photon.MmoDemo.Server.MmoInitialOperationHandler.OperationRadarSubscribe ( PeerBase  peer,
OperationRequest  request,
SendParameters  sendParameters 
)
inlinestatic

Expects operation RadarSubscribe and subscribes the peer to the Radar. Publishes an OperationResponse with error code ReturnCode.Ok if successful.