/// <summary> /// Creates a new instance of the <see cref="IncomingSocialListenerPeer"/> class. /// </summary> /// <param name="initRequest"></param> /// <param name="application"> </param> public IncomingSocialListenerPeer(InitRequest initRequest, SocialApplication application) : base(initRequest.Protocol, initRequest.PhotonPeer) { this.application = application; this.social = MmoSocial.Instance; this.listeningWorlds = new List <short>(); }
/// <summary> /// Creates a new instance of the <see cref="SocialServerPeer"/> class /// </summary> /// <param name="initResponse"></param> /// <param name="application"></param> public SocialServerPeer(InitResponse initResponse, SocialApplication application) : base(initResponse, application) { this.application = application; this.messageFiber = new ThreadFiber(new DefaultQueue(), "SocialMessageFiber", true, ThreadPriority.Highest); this.messageFiber.Start(); this.social = MmoSocial.Instantiate(this); // the lock will wait indefinitely this.sessions = new ConcurrentStorageMap <int, ISession>(-1); this.RequestFiber.Enqueue(this.Register); }