public override void Read(ChannelHandlerContext ctx, object msg) { _lastReadTime.Set(Convenient.CurrentTimeMillis()); //ctx.FireRead(msg); }
public override void Write(ChannelHandlerContext ctx, object msg) { ctx.Channel.WriteCompleted += channel => _lastWriteTime.Set(Convenient.CurrentTimeMillis()); //ctx.FireWrite(msg); // TODO needed? }
/// <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()); }