/// <summary>
 /// Updates the ping internal on the current message reader.
 /// </summary>
 /// <param name="message">The message.</param>
 public override void Visit(SetPingIntervalMessage message)
 {
     var interval = TimeSpan.FromMilliseconds(250d);
     // I am not sure this the correct location for this logic but the quicker we ping the
     // message stream the quicker we get pushed the data.
     if(message.PingInterval < interval)
     {
         interval = message.PingInterval;
     }
     _reader.MessageStream.PingInterval = interval;
 }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 public virtual void Visit(SetPingIntervalMessage message)
 {
 }
 void IMessageVisitor.Visit(SetPingIntervalMessage message)
 {
 }
Ejemplo n.º 4
0
 /// <inheritdoc/>
 public override void Visit(SetPingIntervalMessage message)
 {
     Model.PingInterval = message.PingInterval;
 }
Ejemplo n.º 5
0
 private static Message TranslateSetPingIntervalMessage(SetPingIntervalMessage message)
 {
     if(message.PingInterval == TimeSpan.Zero || message.PingInterval >= MaxPingInterval)
     {
         Log.InfoFormat("read terminal message: {0}", message);
         return new CompositeMessage(new SetSessionStatusMessage(SessionStatus.Finished), EndOfSessionMessage.Instance);
     }
     return null;
 }
Ejemplo n.º 6
0
 /// <inheritdoc/>
 public override void Visit(SetPingIntervalMessage message)
 {
     Translated = TranslateSetPingIntervalMessage(message);
 }