public HttpApplicationHandler(IPhotonApplication photonApplication, string applicationName, TimeSpan peerExpiration)
 {
     this.peerCache = new PeerCache();
     this.peerCache.PeerExpiration = peerExpiration;
     this.peerCache.OnPeerExpired += new Action <PhotonHttpPeer>(this.OnPeerCachePeerExpired);
     this.photonApplication        = photonApplication;
     ((IPhotonControl)this.photonApplication).OnStart(string.Empty, applicationName, this, null, null, string.Empty);
     ((IPhotonControl)this.photonApplication).OnPhotonRunning();
 }
示例#2
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="T:Photon.SocketServer.Web.TcpReader"/> class.
 /// </summary>
 /// <param name="application"></param>
 internal TcpPeer(IPhotonApplication application)
 {
     this.application  = application;
     this.tcpReader    = new TcpReader(this);
     this.connectionId = Interlocked.Increment(ref connectionIdCounter);
 }
 public HttpApplicationHandler(IPhotonApplication photonApplication, string applicationName) : this(photonApplication, applicationName, TimeSpan.FromSeconds(30.0))
 {
 }