예제 #1
0
파일: FileClient.cs 프로젝트: Hoikas/mudpit
        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();
            }
        }
예제 #2
0
파일: FileClient.cs 프로젝트: Hoikas/mudpit
 private void IPong()
 {
     File_PingPong pong = new File_PingPong();
     pong.Read(fStream);
     if (Pong != null)
         Pong(pong.fPingTime);
 }