Photon Server API

Namespaces | Classes | Typedefs | Enumerations
Photon.SocketServer Namespace Reference

Namespaces

namespace  Annotations
 
namespace  Collections
 
namespace  Concurrency
 
namespace  Diagnostics
 
namespace  Net
 
namespace  Peers
 
namespace  Rpc
 
namespace  Security
 
namespace  ServerToServer
 
namespace  Web
 

Classes

class  ApplicationBase
 The base class for a Photon application. The main method to override is CreatePeer. See Setup for initialization recommendations. More...
 
class  BroadcastEventData
 
class  ClientPeer
 
class  EventData
 This class contains data that is sent to clients with PhotonPeer.SendEvent. The IRpcProtocol serializes EventData with SerializeEventData. SetParameters(object) converts properties that are flagged with DataMemberAttribute into the Parameters dictionary. More...
 
interface  IEventData
 The implementation class contains data that is sent to clients with PeerBase.SendEvent(IEventData,SendParameters). Implementors are EventData and SerializedEventData. More...
 
interface  IManagedPeer
 
class  InitRequest
 Provides initialization request parameter. More...
 
class  InitResponse
 Provides initialization request parameter. More...
 
interface  IRpcProtocol
 The implementation class supports a specific real time server protocol. More...
 
interface  IUnknownTypeMapper
 
class  OperationRequest
 Each incoming operation is translated to an OperationRequest. It is then dispatched with PeerBase.OnOperationRequest. More...
 
class  OperationResponse
 Incoming OperationRequests are often answered with a response (represented by this class). It can be sent to the client by using the PeerBase.SendOperationResponse method. The IRpcProtocol.SerializeOperationResponse method serializes OperationResponse instances. SetParameters(object) converts properties that are flagged with DataMemberAttribute into the Parameters dictionary. More...
 
class  PeerBase
 This class is a base class for server connections. The RequestFiber processes all incoming messages. More...
 
class  PeerHelper
 This class provides access to some internal members of PeerBase and S2SPeerBase In general these methods are indended for testing. More...
 
class  Protocol
 This class provides access to the available protocols. More...
 
struct  SendParameters
 The struct contains the parameters for PeerBase.SendOperationResponse(OperationResponse,SendParameters), PeerBase.SendEvent(IEventData,SendParameters) and S2SPeerBase.SendOperationRequest(OperationRequest,SendParameters) and contains the info about incoming data at PeerBase.OnOperationRequest, S2SPeerBase.OnEvent and S2SPeerBase.OnOperationResponse. More...
 
class  SerializedEventData
 An IEventData wrapper that serializes the event upon creation. This has a performance benefit if multiple receivers use the same protocol. More...
 

Typedefs

using ProtocolType = Photon.SocketServer.Rpc.Protocols.ProtocolType
 

Enumerations

enum  ConnectionState {
  ConnectionState.Disconnected = 0, ConnectionState.Connecting = 1, ConnectionState.Connected = 2, ConnectionState.Disconnecting = 3,
  ConnectionState.DisposeDisconnecting = 4, ConnectionState.Disposed = 5, ConnectionState.Initializing = 6
}
 
enum  EncryptionMethod : byte { EncryptionMethod.Sha256Pkcs7 = 0, EncryptionMethod.Md5Iso10126 = 1 }
 Specifies the encryption method for PeerBase.InitializeEncryption(byte[], EncryptionMethod). More...
 
enum  NetworkProtocolType {
  NetworkProtocolType.Unknown, NetworkProtocolType.Udp, NetworkProtocolType.Tcp, NetworkProtocolType.WebSocket,
  NetworkProtocolType.Http, NetworkProtocolType.SecureWebSocket
}
 Specifies the available network protocol types. More...
 
enum  Reliability { Reliability.Reliable = 3, Reliability.Unreliable = 2 }
 Determines if an OperationRequest, an OperationResponse or an EventData is transported reliable or unreliable. More...
 
enum  DeliveryMode : byte { DeliveryMode.Reliable = 0, DeliveryMode.UnSequenced = 1, DeliveryMode.UnReliable = 2, DeliveryMode.ReliableUnsequenced = 4 }
 
enum  SendResult {
  SendResult.Ok = SendResults.SentOk, SendResult.Disconnected = SendResults.SendDisconnected, SendResult.SendBufferFull = SendResults.SendBufferFull, SendResult.MessageToBig = SendResults.SendMsgTooBig,
  SendResult.InvalidChannel = SendResults.SendInvalidChannel, SendResult.Failed = SendResults.SendFailed, SendResult.InvalidContentType = SendResults.SendInvalidContentType, SendResult.EncryptionNotSupported = -1
}
 Return value of PeerBase.SendEvent(IEventData,SendParameters), PeerBase.SendOperationResponse(OperationResponse,SendParameters) and S2SPeerBase.SendOperationRequest(OperationRequest,SendParameters). More...
 

Typedef Documentation

◆ ProtocolType

Enumeration Type Documentation

◆ ConnectionState

Enumerator
Disconnected 
Connecting 
Connected 
Disconnecting 
DisposeDisconnecting 
Disposed 
Initializing 

◆ DeliveryMode

Enumerator
Reliable 
UnSequenced 
UnReliable 
ReliableUnsequenced 

◆ EncryptionMethod

Specifies the encryption method for PeerBase.InitializeEncryption(byte[], EncryptionMethod).

Enumerator
Sha256Pkcs7 

An SHA256 hash is used as the secret with a PKCS7 padding.

Md5Iso10126 

An MD5 hash is used as the secret with a ISO10126 padding

◆ NetworkProtocolType

Specifies the available network protocol types.

Enumerator
Unknown 

Unknown protocol type

Udp 

The udp protocol

Tcp 

The tcp protocol

WebSocket 

The websocket protocol

Http 

The HTTP protocol

SecureWebSocket 

The secure websocket protocol

◆ Reliability

Determines if an OperationRequest, an OperationResponse or an EventData is transported reliable or unreliable.

Enumerator
Reliable 

Reliable events/operations are guaranteed to arrive unless the client disconnects.

Unreliable 

Unreliable events/operations are not guaranteed to arrive.

◆ SendResult

Return value of PeerBase.SendEvent(IEventData,SendParameters), PeerBase.SendOperationResponse(OperationResponse,SendParameters) and S2SPeerBase.SendOperationRequest(OperationRequest,SendParameters).

Enumerator
Ok 

Successfully enqueued for sending.

Disconnected 

Peer is disconnected; data sending was refused.

SendBufferFull 

The peer's send buffer is full; data sending was refused.

MessageToBig 

Sending failed because the message size exceeded the MaxMessageSize that was configured for the receiver.

InvalidChannel 

Send failed because the specified channel is not supported by the peer.

Failed 

Send Failed due an unexpected error.

InvalidContentType 

Send failed because the specified content type is not supported by the peer.

EncryptionNotSupported 

Encrypted sending failed; peer does not support encryption.