コード例 #1
0
 public override void Read(ChannelHandlerContext ctx, object msg)
 {
     _lastReadTime.Set(Convenient.CurrentTimeMillis());
     //ctx.FireRead(msg);
 }
コード例 #2
0
 public override void Write(ChannelHandlerContext ctx, object msg)
 {
     ctx.Channel.WriteCompleted += channel => _lastWriteTime.Set(Convenient.CurrentTimeMillis());
     //ctx.FireWrite(msg); // TODO needed?
 }
コード例 #3
0
 /// <summary>
 /// Sets the time when last seen online to now.
 /// </summary>
 /// <returns>The number of successful checks.</returns>
 public int SuccessfullyChecked()
 {
     _lastSeenOnline.Set(Convenient.CurrentTimeMillis());
     _failed.Set(0);
     return(_successfullyChecked.IncrementAndGet());
 }