コード例 #1
0
 /// <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>();
 }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
ファイル: MmoSocial.cs プロジェクト: Inifield/zoso-server
 /// <summary>
 /// Instantiates the singleton of the <see cref="MmoSocial"/>. If it has already been instantiated returns the old instance.
 /// </summary>
 public static MmoSocial Instantiate(ISocialServer server)
 {
     lock (typeof(MmoSocial))
         return(Instance ?? (Instance = new MmoSocial(server)));
 }