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