コード例 #1
0
 public cTcpSocketServerThread(cTcpSocketServer tssSocketServer)
 {
     //
     // Remember our parent object
     //
     SocketServer = tssSocketServer;
 }
コード例 #2
0
        public cTcpSocket(int iConnectionType, string sServerAddress, int iReconnectInterval,
                          bool bConnectAutomatically, int iPortNumber, int iPacketTimeout, int iWrapMethod)
        {
            ConnectionMethod = iConnectionType;
            WrapMethod       = iWrapMethod;
            PacketTimeout    = iPacketTimeout;

            switch (ConnectionMethod)
            {
            case ConnectionMethod_SocketServer:
                TcpSocketServer = new cTcpSocketServer(this, iPortNumber);
                break;

            case ConnectionMethod_SocketClient:
                TcpSocketClient = new cTcpSocketClient(this, sServerAddress, iReconnectInterval, bConnectAutomatically);
                break;

            default:
                break;
            }
        }