예제 #1
0
        public HandleTcpClient(Tcp_Server _tcpServer, TcpClient _tcpClient, ConcurrentQueue <Score> _scoreQueue, ConcurrentQueue <Judge> _judgeQueue)
        {
            scoreQueue = _scoreQueue;
            judgeQueue = _judgeQueue;
            tcpServer  = _tcpServer;
            tcpClient  = _tcpClient;
            endPoint   = tcpClient.Client.RemoteEndPoint as IPEndPoint;

            threadClient = new Thread(client);
            threadClient.Start();
        }
예제 #2
0
 public static Tcp_Server instance()
 {
     return(tcpServer ?? (tcpServer = new Tcp_Server()));              //?? checks for null. if tcpServer == null, right hand operator is returned
 }