public ClientHost(SimpleClient client)
        {
            Activity         = PacketActivityEnum.None;
            Client           = client;
            logger           = true;
            m_Dispatcher     = new MessageDispatcher();
            m_dispatcherTask = new DispatcherTask(m_Dispatcher);
            m_dispatcherTask.Start();
            m_floods               = new List <NetworkMessage>();
            m_flood_timer          = new System.Timers.Timer();
            m_flood_timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            m_flood_timer.Interval = 1000;
            if (FloodQuit)
            {
                m_flood_timer.Start();
            }

            if (client != null)
            {
                Client.DataReceived += this.ClientDataReceive;
                Client.Disconnected += this.ClientDisconnected;
            }
        }
Exemple #2
0
 public DisconnectedEventArgs(SimpleClient socket)
 {
     Socket = socket;
 }
 public ISCClient(string ip, short port)
 {
     m_address = ip;
     m_port    = port;
     m_client  = new SimpleClient();
 }