Ejemplo n.º 1
0
 public virtual void  pushAliveReqForRecipients()
 {
     if (this.messageCoder != null)
     {
         lock (aliveRequestCheckList)
         {
             MessageEnvelope envelope = new MessageEnvelope();
             MessageBody     body     = new MessageBody();
             AliveRequest    req      = new AliveRequest();
             envelope.Id   = ("-PING-");
             req.Timestamp = (System.DateTime.Now.Ticks);
             body.selectAliveRequest(req);
             envelope.Body = (body);
             ByteBuffer buffer;
             try
             {
                 buffer = messageCoder.encode(envelope);
                 foreach (Transport transport in aliveRequestCheckList)
                 {
                     pushPacket(transport, buffer);
                 }
             }
             catch (System.Exception e)
             {
                 Console.WriteLine(e.ToString());
             }
         }
     }
 }