Photon Server API
Public Member Functions | Protected Member Functions | List of all members
Photon.Hive.HiveApplication Class Reference

Main photon application. This application is started from the photon server. This class creates HivePeers for new clients. Operation dispatch logic is handled by the HivePeer. More...

Inheritance diagram for Photon.Hive.HiveApplication:
Photon.SocketServer.ApplicationBase

Public Member Functions

 HiveApplication ()
 
- Public Member Functions inherited from Photon.SocketServer.ApplicationBase
void BroadCastEvent< TPeer > (IEventData eventData, IEnumerable< TPeer > peers, SendParameters sendParameters)
 Sends an event to a list of peers. This method serializes the data just once per protocol instead of once per peer. More...
 
bool ConnectToServerTcp (IPEndPoint remoteEndPoint, string applicationName, object state)
 Establishes a TCP connection between two Photon instances. CreateServerPeer is called once the connection is established. OnServerConnectionFailed is called if the connection fails. More...
 
bool ConnectToServerTcp (IPEndPoint remoteEndPoint, string applicationName, object state, IRpcProtocol protocol)
 Establishes a TCP connection between two Photon instances. CreateServerPeer is called once the connection is established. OnServerConnectionFailed is called if the connection fails. More...
 
bool ConnectToServerMuxTcp (IPEndPoint remoteEndPoint, string applicationName, object state)
 Establishes a logical, multiplexed TCP connection between two Photon instances. Multiple logical connections are sharing a single physical connection. CreateServerPeer is called once a logical connection is established. OnServerConnectionFailed is called if the logical connection fails. If a phyiscal connection exists when ConnectToServerMuxTcp is called, it is used; otherwise a physical connection is established. If the physical connection is aborted, all logical connections are aborted as well. More...
 
bool ConnectToServerUdp (IPEndPoint remoteEndPoint, string applicationName, object state, byte numChannels, short?mtu)
 Establishes an UDP connection between two Photon instances. CreateServerPeer is called once the connection is established. OnServerConnectionFailed is called if the connection fails. More...
 
bool ConnectToServerWebSocketHixie76 (IPEndPoint remoteEndPoint, string applicationName, object state, string origin)
 Establishes an WebSocket connection between two Photon instances, using the Hixie76 WebSocket protocol. CreateServerPeer is called once the connection is established. OnServerConnectionFailed is called if the connection fails. More...
 
bool ConnectToServerWebSocket (IPEndPoint remoteEndPoint, string applicationName, object state, WebSocketVersion webSocketVersion, IRpcProtocol protocol)
 Establishes an WebSocket connection between two Photon instances. CreateServerPeer is called once the connection is established. OnServerConnectionFailed is called if the connection fails. More...
 
bool ConnectToServer (IPEndPoint remoteEndPoint, string applicationName, object state)
 This method overload is obsolete; use ConnectToServerTcp. More...
 
bool ConnectToServer (IPEndPoint remoteEndPoint, bool useMux, string applicationName, object state)
 This method overload is obsolete; use ConnectToServerMuxTcp. More...
 
bool ConnectToServer (IPEndPoint remoteEndPoint, string applicationName, object state, IRpcProtocol protocol)
 This method overload is obsolete; use ConnectToServerTcp. More...
 
bool ConnectToServer (IPEndPoint remoteEndPoint, string applicationName, object state, byte numChannels, short?mtu)
 This method overload is obsolete; use ConnectToServerUdp. More...
 
string[] ListenerList (out ListenerStatus[] status)
 
bool ListenerStart (string name)
 
bool ListenerStop (string name)
 
IPhotonApplication OnStart (string instanceName, string applicationName, IPhotonApplicationSink sink, IControlListeners controlListners, IPhotonApplicationsCounter applicationsCounter, string unmanagedLogDirectory)
 Called when the application is started. This method calls Setup. More...
 
override System.Runtime.Remoting.ObjRef CreateObjRef (Type requestedType)
 
new object GetLifetimeService ()
 
override object InitializeLifetimeService ()
 

Protected Member Functions

override PeerBase CreatePeer (InitRequest initRequest)
 Creates a HivePeer to handle OperationRequests. More...
 
override void Setup ()
 Application initializtion. More...
 
void Initialize ()
 
override void TearDown ()
 Called when the server shuts down. More...
 
- Protected Member Functions inherited from Photon.SocketServer.ApplicationBase
 ApplicationBase ()
 Initializes a new instance of the ApplicationBase class. More...
 
virtual IFiber CreatePeerFiber (InitRequest request)
 
virtual void OnServerConnectionFailed (int errorCode, string errorMessage, object state)
 Invoked if a connection attempt to a server fails. More...
 
virtual void OnStopRequested ()
 Called when photon starts a new app domain for the same application. New connections will connect to the new app domain. This app domain continues to receive operations until from existing connections until the last peer disconnects. More...
 
new MarshalByRefObject MemberwiseClone (bool cloneIdentity)
 

Additional Inherited Members

- Properties inherited from Photon.SocketServer.ApplicationBase
static ApplicationBase Instance [get]
 Gets the application instance. More...
 
string ApplicationName [get]
 Gets the application name set in PhotonServer.config. More...
 
string ApplicationPath [get]
 Gets the application path set in PhotonServer.config. More...
 
string ApplicationRootPath [get]
 Gets the path of the application root path - base location of all applications. More...
 
string BinaryPath [get]
 Gets the path of the application binaries. More...
 
int PeerCount [get]
 Gets the number of peers currently connected to the application. More...
 
string PhotonInstanceName [get]
 Gets the name of the photon instance. More...
 
bool Running [get]
 Gets a value indicating whether the application is running (the time between Setup and OnStopRequested). More...
 
string HwId [get]
 
string UnmanagedLogPath [get]
 Gets the log path of Photon. More...
 
Version CoreVersion [get]
 Gets Photon Native Core version (PhotonSocketServer.exe). More...
 
Version SdkVersion [get]
 Gets Photon Managed Core version (SDK). More...
 

Detailed Description

Main photon application. This application is started from the photon server. This class creates HivePeers for new clients. Operation dispatch logic is handled by the HivePeer.

Constructor & Destructor Documentation

Photon.Hive.HiveApplication.HiveApplication ( )
inline

Member Function Documentation

override PeerBase Photon.Hive.HiveApplication.CreatePeer ( InitRequest  initRequest)
inlineprotectedvirtual

Creates a HivePeer to handle OperationRequests.

Parameters
initRequestThe initialization request.
Returns
A new HivePeer instance.

Implements Photon.SocketServer.ApplicationBase.

void Photon.Hive.HiveApplication.Initialize ( )
inlineprotected
override void Photon.Hive.HiveApplication.Setup ( )
inlineprotectedvirtual

Application initializtion.

Implements Photon.SocketServer.ApplicationBase.

override void Photon.Hive.HiveApplication.TearDown ( )
inlineprotectedvirtual

Called when the server shuts down.

Implements Photon.SocketServer.ApplicationBase.