Ejemplo n.º 1
0
 public cTcpSocketServerThread(cTcpSocketServer tssSocketServer)
 {
     //
     // Remember our parent object
     //
     SocketServer = tssSocketServer;
 }
Ejemplo n.º 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;
            }
        }