예제 #1
0
 public MsgConnection(Socket sokMsg, DGShowMsg dgShow, DGCloseConn dgCloseConn)
 {
     this.sokMsg      = sokMsg;
     this.dgShow      = dgShow;
     this.dgCloseConn = dgCloseConn;
     //创建通信线程,负责调用通信套接字,来接收客户端消息。
     thrMsg = new Thread(ReceiveMsg);
     thrMsg.IsBackground = true;
     thrMsg.Start(this.sokMsg);
 }
예제 #2
0
        public Server(Socket sokMsg, DGShowMsg dgShow, DGCloseConn dgCloseConn, DGAnalysis dgAnalysis)
        {
            this.sokMsg      = sokMsg;
            this.dgShow      = dgShow;
            this.dgCloseConn = dgCloseConn;
            this.dgAnalysis  = dgAnalysis;

            // 创建通信线程,负责调用通信套接字,来接收客户端消息。
            thrMsg = new Thread(ReceiveMsg)
            {
                IsBackground = true
            };
            thrMsg.Start(this.sokMsg);
        }