예제 #1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="roomName">name of the room</param>
        /// <param name="callbackObj">callback Obj</param>
        public Room(string roomName, IRoomCallback callbackObj = null)
        {
            RoomName    = roomName;
            CallBackObj = callbackObj;
            Task t = new Task(delegate()
            {
                OnCreated(this);
            });

            t.Start();
        }
예제 #2
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="roomName">name of the room</param>
        /// <param name="callbackObj">callback Obj</param>
        public Room(string roomName, IRoomCallback callbackObj=null)
        {
            RoomName = roomName;
            CallBackObj = callbackObj;
            Task t = new Task(delegate()
            {
                OnCreated(this);
            });
            t.Start();

        }
예제 #3
0
 public static void AddRoomCallback(IRoomCallback r)
 {
     rooms.Add(r);
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="acceptor">acceptor object</param>
 /// <param name="callBackObj">callback object</param>
 /// <param name="port">port</param>
 /// <param name="noDelay">noDelay falg</param>
 public ServerOps(INetworkServerAcceptor acceptor, String port, INetworkServerCallback callBackObj = null, IRoomCallback roomCallBackObj = null, bool noDelay = true, int socketCount = SocketCount.Infinite)
 {
     this.Port            = port;
     this.Acceptor        = acceptor;
     this.CallBackObj     = callBackObj;
     this.RoomCallBackObj = roomCallBackObj;
     this.NoDelay         = noDelay;
     this.MaxSocketCount  = socketCount;
 }