Exemplo n.º 1
0
 private void heartBeat()
 {
     while (this.isConnected())
     {
         PK_C_NOTIFY_HEARTBEAT heartBeatPacket = new PK_C_NOTIFY_HEARTBEAT();
         this.sendPacket(heartBeatPacket);
         Thread.Sleep(1000);
     }
 }
Exemplo n.º 2
0
 public void HeartBeat()
 {
     while (IsConnected())
     {
         PK_C_NOTIFY_HEARTBEAT heartBeatPacket = new PK_C_NOTIFY_HEARTBEAT();
         SendPacket(heartBeatPacket);
         Thread.Sleep(1000);
     }
 }
        private void heartBeat()
        {
            while (isConnected())
            {
                PK_C_NOTIFY_HEARTBEAT heartBeatPacket = new PK_C_NOTIFY_HEARTBEAT();
                sendPacket(heartBeatPacket);

                ping_ = DateTime.Now.Ticks;

                Thread.Sleep(1000);
            }
        }