예제 #1
0
 //constructor creates the socket and threads to listen to new connections
 public WondersServer(int p) 
 {
     playersList = new PlayerThreadData[7];
     port = p;
     listenSocket = new TcpListener(IPAddress.Any, port);
     mQueue = new ServerMessageQueue();
     ASCIIEncoding encoder = new ASCIIEncoding();
     full = encoder.GetBytes("full");
     serverLock = new object();
     change = false;
     timer = new CommTimer(mQueue);
 }
예제 #2
0
        //constructor creates the socket and threads to listen to new connections
        public WondersServer(int p)
        {
            playersList  = new PlayerThreadData[7];
            port         = p;
            listenSocket = new TcpListener(IPAddress.Any, port);
            mQueue       = new ServerMessageQueue();
            ASCIIEncoding encoder = new ASCIIEncoding();

            full       = encoder.GetBytes("full");
            serverLock = new object();
            change     = false;
            timer      = new CommTimer(mQueue);
        }