예제 #1
0
파일: server.cs 프로젝트: rkpandya/pinac
 public void InsertSendTime(String ipport, String time)
 {
     try
     {
         if (IPtoHeartbeat.Contains(ipport))
         {
             Heartbeat temp = (Heartbeat)IPtoHeartbeat[ipport];
             temp.SendTime = time;
             // temp.ReceiveTime = "";
             IPtoHeartbeat[ipport] = temp;
         }
         else
         {
             Heartbeat temp = new Heartbeat();
             temp.SendTime = time;
             temp.ReceiveTime = "";
             IPtoHeartbeat.Add(ipport, temp);
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
     }
 }
예제 #2
0
파일: server.cs 프로젝트: shranjan/pinac
 public void InsertSendTime(String ipport, String time)
 {
     if (IPtoHeartbeat.Contains(ipport))
     {
         Heartbeat temp = (Heartbeat)IPtoHeartbeat[ipport];
         temp.SendTime = time;
        // temp.ReceiveTime = "";
         IPtoHeartbeat[ipport] = temp;
     }
     else
     {
         Heartbeat temp = new Heartbeat();
         temp.SendTime = time;
         temp.ReceiveTime = "";
         IPtoHeartbeat.Add(ipport, temp);
      }
 }