Photon Server API

Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Photon.LoadBalancing.MasterServer.MasterClientPeer Class Reference
Inheritance diagram for Photon.LoadBalancing.MasterServer.MasterClientPeer:
Photon.SocketServer.Rpc.Peer Photon.LoadBalancing.MasterServer.Lobby.ILobbyPeer Photon.Common.Authentication.ICustomAuthPeer Photon.SocketServer.ClientPeer Photon.SocketServer.PeerBase

Public Member Functions

 MasterClientPeer (InitRequest initRequest)
 
virtual string GetEncryptedAuthenticationToken (AuthenticateRequest request)
 
virtual void OnCustomAuthenticationError (Photon.Common.ErrorCode errorCode, string debugMessage, IAuthenticateRequest authenticateRequest, SendParameters sendParameters, object state)
 
virtual void OnCustomAuthenticationResult (CustomAuthenticationResult customAuthResult, IAuthenticateRequest authenticateRequest, SendParameters sendParameters, object state)
 
OperationResponse HandleAuthenticate (OperationRequest operationRequest, SendParameters sendParameters)
 
OperationResponse HandleJoinLobby (OperationRequest operationRequest, SendParameters sendParameters)
 
OperationResponse HandleLeaveLobby (OperationRequest operationRequest)
 
OperationResponse HandleCreateGame (OperationRequest operationRequest, SendParameters sendParameters)
 
OperationResponse HandleFindFriends (OperationRequest operationRequest, SendParameters sendParameters)
 
OperationResponse HandleJoinGame (OperationRequest operationRequest, SendParameters sendParameters)
 
OperationResponse HandleJoinRandomGame (OperationRequest operationRequest, SendParameters sendParameters)
 
OperationResponse HandleLobbyStatsRequest (OperationRequest operationRequest, SendParameters sendParameters)
 
OperationResponse HandleRpcRequest (OperationRequest operationRequest, SendParameters sendParameters)
 
- Public Member Functions inherited from Photon.SocketServer.Rpc.Peer
void SetCurrentOperationHandler (IOperationHandler operationHandler)
 Sets CurrentOperationHandler. More...
 
- Public Member Functions inherited from Photon.SocketServer.ClientPeer
void Trace (bool enabled, string tag)
 
- Public Member Functions inherited from Photon.SocketServer.PeerBase
void Initialize (InitRequest initRequest)
 
override string ToString ()
 
void Disconnect ()
 Closes the connection. More...
 
void AbortConnection ()
 Forces the connection to close immediately. Should only be used if "Disconnect" does not lead to a clean connection shutdown, e.g. in case of an overloaded connection. More...
 
void Flush ()
 Flushes all pending data to the socket. More...
 
byte[] InitializeEncryption (byte[] otherPartyPublicKey)
 Initializes the peer to receive and send encrypted operations with EncryptionMethod.Sha256Pkcs7. More...
 
byte[] InitializeEncryption (byte[] otherPartyPublicKey, EncryptionMethod mode)
 Initializes the peer to receive and send encrypted operations. More...
 
SendResult SendEvent (IEventData eventData, SendParameters sendParameters)
 Sends an IEventData object to the client. More...
 
SendResult SendMessage (object message, SendParameters sendParameters)
 
SendResult SendOperationResponse (OperationResponse operationResponse, SendParameters sendParameters)
 Sends the operation response to the client. More...
 
void GetStats (out int roundTripTime, out int roundTripTimeVariance, out int numFailures)
 
void SetDebugString (string message)
 
int GetLastTouch ()
 
void SetPrivateCustomTypeCache (CustomTypeCache cache)
 Sets private custom type cache. It is supposed to be used together with plugins. In other case Proptocol.TryRegisterCustomType should be used More...
 
void Dispose ()
 Disposes the peer. More...
 
- Public Member Functions inherited from Photon.Common.Authentication.ICustomAuthPeer
void OnCustomAuthenticationError (ErrorCode errorCode, string debugMessage, IAuthenticateRequest authenticateRequest, SendParameters sendParameters, object state)
 

Protected Member Functions

virtual void CreateAuthTokenAndSendResponse (CustomAuthenticationResult customAuthResult, AuthenticateRequest authRequest, SendParameters sendParameters, AuthSettings authSettings, OperationResponse operationResponse)
 
override void OnDisconnect (PhotonHostRuntimeInterfaces.DisconnectReason reasonCode, string reasonDetail)
 
- Protected Member Functions inherited from Photon.SocketServer.Rpc.Peer
 Peer (InitRequest initRequest)
 Initializes a new instance of the Peer class. More...
 
override void OnDisconnect (DisconnectReason reasonCode, string reasonDetail)
 Executed when a peer disconnects. This method is being enqueued to the fiber. More...
 
- Protected Member Functions inherited from Photon.SocketServer.ClientPeer
 ClientPeer (InitRequest initRequest)
 
- Protected Member Functions inherited from Photon.SocketServer.PeerBase
void Trace (bool enabled, object tag)
 
virtual SendResult SendData (byte[] data, SendParameters sendParameters)
 Sends bytes to the client. More...
 
virtual void OnReceive (byte[] data, SendParameters sendParameters)
 Invoked if incoming data was received for the peer. More...
 
virtual void Dispose (bool disposing)
 Disposes the internal fibers. More...
 
virtual void OnSendBufferEmpty ()
 The default behavior of OnSendBufferFull is to disconnect the client. If this behavior is changed (override) the inheritor can pause sending until OnSendBufferEmpty is called. More...
 
virtual void OnUnexpectedDataReceived (byte[] data, string debugMessage)
 This method is called if incoming data has an unexpected format. Per default this method disconnects the client. Override to change this behavior. More...
 

Protected Attributes

AuthenticationToken unencryptedAuthToken
 

Properties

string UserId [get, set]
 
bool UseHostnames [get]
 
bool HasExternalApi [get, set]
 
virtual GameApplication Application [get, protected set]
 
AppLobby AppLobby [get, set]
 
IGameListSubscription GameChannelSubscription [get, set]
 
WebRpcHandler WebRpcHandler [get, set]
 
int HttpRpcCallsLimit [get, protected set]
 
- Properties inherited from Photon.SocketServer.Rpc.Peer
IOperationHandler CurrentOperationHandler [get]
 Gets the current IOperationHandler. OnOperationRequest and OnDisconnect calls the CurrentOperationHandler. More...
 
- Properties inherited from Photon.SocketServer.PeerBase
ConnectionState ConnectionState [get, set]
 Gets the ConnectionState for this instance. More...
 
bool Connected [get]
 Gets a value indicating whether this PeerBase instance is connected. More...
 
int ConnectionId [get]
 Gets the connection id. More...
 
bool Disposed [get]
 Gets a value indicating whether the peer was disposed. More...
 
string LocalIP [get]
 Gets the IP the client connects to. More...
 
IPAddress? LocalIPAddress [get]
 Gets the IP Address the client connects to. More...
 
int LocalPort [get]
 Gets the port the client connects to. More...
 
NetworkProtocolType NetworkProtocol [get]
 Gets the network protocol type used by the peer. More...
 
IRpcProtocol Protocol [get, set]
 Gets the used IRpcProtocol protocol. More...
 
string RemoteIP [get]
 Gets the client's remote IP address. More...
 
IPAddress? RemoteIPAddress [get]
 Gets the client's remote IP address. More...
 
int RemotePort [get]
 Gets the port the client connects from. More...
 
IFiber RequestFiber [get]
 Gets fiber for incoming messages. More...
 
int RoundTripTime [get, protected set]
 Gets the last round trip time for this peer. More...
 
int RoundTripTimeVariance [get, protected set]
 Gets the last round trip time variance for this peer. More...
 
int NumFailures [get, protected set]
 
bool LocalIPAddressIsIPv6 [get]
 If true connection is using a server IPv6 endpoint. More...
 
bool SourceUsingIPv6 [get]
 If true the peer is using IPv6 to connect to the server, if the server enpoint used is not IPv6 (LocalIPAddressIsIPv6) it means the client is beeing bridged (DNS64+NAT64), also IsIPv6ToIPv4Bridged. More...
 
bool IsIPv6ToIPv4Bridged [get]
 If true the client is beeing bridged (DNS64+NAT64), also SourceUsingIPv6. More...
 
- Properties inherited from Photon.LoadBalancing.MasterServer.Lobby.ILobbyPeer
NetworkProtocolType NetworkProtocol [get]
 
IPAddress LocalIPAddress [get]
 
int LocalPort [get]
 
string UserId [get]
 
bool UseHostnames [get]
 
- Properties inherited from Photon.Common.Authentication.ICustomAuthPeer
int ConnectionId [get]
 
string UserId [get, set]
 

Constructor & Destructor Documentation

◆ MasterClientPeer()

Photon.LoadBalancing.MasterServer.MasterClientPeer.MasterClientPeer ( InitRequest  initRequest)
inline

Member Function Documentation

◆ CreateAuthTokenAndSendResponse()

virtual void Photon.LoadBalancing.MasterServer.MasterClientPeer.CreateAuthTokenAndSendResponse ( CustomAuthenticationResult  customAuthResult,
AuthenticateRequest  authRequest,
SendParameters  sendParameters,
AuthSettings  authSettings,
OperationResponse  operationResponse 
)
inlineprotectedvirtual

◆ GetEncryptedAuthenticationToken()

virtual string Photon.LoadBalancing.MasterServer.MasterClientPeer.GetEncryptedAuthenticationToken ( AuthenticateRequest  request)
inlinevirtual

◆ HandleAuthenticate()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleAuthenticate ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ HandleCreateGame()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleCreateGame ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ HandleFindFriends()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleFindFriends ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ HandleJoinGame()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleJoinGame ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ HandleJoinLobby()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleJoinLobby ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ HandleJoinRandomGame()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleJoinRandomGame ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ HandleLeaveLobby()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleLeaveLobby ( OperationRequest  operationRequest)
inline

◆ HandleLobbyStatsRequest()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleLobbyStatsRequest ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ HandleRpcRequest()

OperationResponse Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleRpcRequest ( OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inline

◆ OnCustomAuthenticationError()

virtual void Photon.LoadBalancing.MasterServer.MasterClientPeer.OnCustomAuthenticationError ( Photon.Common.ErrorCode  errorCode,
string  debugMessage,
IAuthenticateRequest  authenticateRequest,
SendParameters  sendParameters,
object  state 
)
inlinevirtual

◆ OnCustomAuthenticationResult()

virtual void Photon.LoadBalancing.MasterServer.MasterClientPeer.OnCustomAuthenticationResult ( CustomAuthenticationResult  customAuthResult,
IAuthenticateRequest  authenticateRequest,
SendParameters  sendParameters,
object  state 
)
inlinevirtual

◆ OnDisconnect()

override void Photon.LoadBalancing.MasterServer.MasterClientPeer.OnDisconnect ( PhotonHostRuntimeInterfaces.DisconnectReason  reasonCode,
string  reasonDetail 
)
inlineprotected

Member Data Documentation

◆ unencryptedAuthToken

AuthenticationToken Photon.LoadBalancing.MasterServer.MasterClientPeer.unencryptedAuthToken
protected

Property Documentation

◆ Application

virtual GameApplication Photon.LoadBalancing.MasterServer.MasterClientPeer.Application
getprotected set

◆ AppLobby

AppLobby Photon.LoadBalancing.MasterServer.MasterClientPeer.AppLobby
getsetprotected

◆ GameChannelSubscription

IGameListSubscription Photon.LoadBalancing.MasterServer.MasterClientPeer.GameChannelSubscription
getset

◆ HasExternalApi

bool Photon.LoadBalancing.MasterServer.MasterClientPeer.HasExternalApi
getset

◆ HttpRpcCallsLimit

int Photon.LoadBalancing.MasterServer.MasterClientPeer.HttpRpcCallsLimit
getprotected set

◆ UseHostnames

bool Photon.LoadBalancing.MasterServer.MasterClientPeer.UseHostnames
get

◆ UserId

string Photon.LoadBalancing.MasterServer.MasterClientPeer.UserId
getset

◆ WebRpcHandler

WebRpcHandler Photon.LoadBalancing.MasterServer.MasterClientPeer.WebRpcHandler
getset