public PendingWriteQueue(IChannelHandlerContext ctx) { Contract.Requires(ctx != null); this.ctx = ctx; this.buffer = ctx.Channel.Unsafe.OutboundBuffer; this.estimatorHandle = ctx.Channel.Configuration.MessageSizeEstimator.NewHandle(); }
protected PendingBytesTracker(IMessageSizeEstimatorHandle estimatorHandle) { if (estimatorHandle is null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.estimatorHandle); } _estimatorHandle = estimatorHandle; }
public BatchingPendingWriteQueue(IChannelHandlerContext ctx, int maxSize) { if (ctx is null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.ctx); } _ctx = ctx; _maxSize = maxSize; _buffer = ctx.Channel.Unsafe.OutboundBuffer; _estimatorHandle = ctx.Channel.Configuration.MessageSizeEstimator.NewHandle(); }
/// <summary> /// Create a new instance /// /// @param unknownSize The size which is returned for unknown messages. /// </summary> public DefaultMessageSizeEstimator(int unknownSize) { Contract.Requires(unknownSize >= 0); this.handle = new HandleImpl(unknownSize); }
/// <summary> /// Create a new instance /// @param unknownSize The size which is returned for unknown messages. /// </summary> public DefaultMessageSizeEstimator(int unknownSize) { Contract.Requires(unknownSize >= 0); this.handle = new HandleImpl(unknownSize); }
public ChannelOutboundBufferPendingBytesTracker(ChannelOutboundBuffer buffer, IMessageSizeEstimatorHandle estimatorHandle) : base(estimatorHandle) { _buffer = buffer; }
public NoopPendingBytesTracker(IMessageSizeEstimatorHandle estimatorHandle) : base(estimatorHandle) { }
private DefaultMessageSizeEstimator(int unknownSize) { _handle = new DefaultHandle(unknownSize); }