Exemple #1
0
        public void Ping(int time)
        {
            File_PingPong ping = new File_PingPong();
            ping.fPingTime = time;

            ResetIdleTimer();
            lock (fSocket) {
                MemoryStream ms = new MemoryStream();
                UruStream s = new UruStream(ms);

                s.WriteUInt(12);
                s.WriteInt((int)FileCli2Srv.PingRequest);
                ping.Write(s);

                fSocket.Send(ms.ToArray());

                s.Close();
                ms.Close();
            }
        }
Exemple #2
0
 private void IPong()
 {
     File_PingPong pong = new File_PingPong();
     pong.Read(fStream);
     if (Pong != null)
         Pong(pong.fPingTime);
 }