public Task WriteAsync(object message) { var next = FindContextOutbound(); ReferenceCountUtil.Touch(message, next); return(next.Invoker.InvokeWriteAsync(next, message)); }
public Task WriteAsync(object msg) // todo: cancellationToken? { AbstractChannelHandlerContext target = this.FindContextOutbound(); ReferenceCountUtil.Touch(msg, target); return(target.Invoker.InvokeWriteAsync(target, msg)); }
public IChannelHandlerContext FireChannelRead(object message) { var next = FindContextInbound(); ReferenceCountUtil.Touch(message, next); next.Invoker.InvokeChannelRead(next, message); return(this); }
public override IReferenceCounted Touch(object hint) { foreach (IRedisMessage message in this.Children) { ReferenceCountUtil.Touch(message); } return(this); }
public IChannelHandlerContext FireChannelRead(object msg) { AbstractChannelHandlerContext target = this.FindContextInbound(); ReferenceCountUtil.Touch(msg, target); target.Invoker.InvokeChannelRead(target, msg); return(this); }
public Task WriteAndFlushAsync(object message) { var target = FindContextOutbound(); ReferenceCountUtil.Touch(message, target); var writeTask = target.Invoker.InvokeWriteAsync(target, message); target = FindContextOutbound(); target.Invoker.InvokeFlush(target); return(writeTask); }
public Task WriteAndFlushAsync(object message) // todo: cancellationToken? { AbstractChannelHandlerContext target; target = this.FindContextOutbound(); ReferenceCountUtil.Touch(message, target); Task writeFuture = target.Invoker.InvokeWriteAsync(target, message); target = this.FindContextOutbound(); target.Invoker.InvokeFlush(target); return(writeFuture); }
/// <summary> /// Read data from the outbound. This may return <c>null</c> if nothing is readable. /// </summary> public T ReadOutbound <T>() { #if DEBUG var message = (T)Poll(_outboundMessages); if (message is object) { _ = ReferenceCountUtil.Touch(message, "Caller of readOutbound() will handle the message from this point."); } return(message); #else return((T)Poll(_outboundMessages)); #endif }
/// <summary> /// Return received data from this <see cref="IChannel"/>. /// </summary> public object ReadInbound() { #if DEBUG var message = Poll(_inboundMessages); if (message is object) { _ = ReferenceCountUtil.Touch(message, "Caller of readInbound() will handle the message from this point"); } return(message); #else return(Poll(_inboundMessages)); #endif }
internal object Touch(object msg, AbstractChannelHandlerContext next) => this.touch ? ReferenceCountUtil.Touch(msg, next) : msg;
public virtual IReferenceCounted Touch(object hint) { ReferenceCountUtil.Touch(this.Content, hint); return(this); }
internal object Touch(object msg, FABHandlerContext next) { return(this.touch == true?ReferenceCountUtil.Touch(msg, next) : msg); }
public IReferenceCounted Touch() { ReferenceCountUtil.Touch(this.Content); return(this); }
public virtual IReferenceCounted Touch() { _ = ReferenceCountUtil.Touch(Content); return(this); }