示例#1
0
文件: Udp.cs 项目: wazazhang/NetUV
        internal Udp(LoopContext loop, PooledByteBufferAllocator allocator)
            : base(loop, uv_handle_type.UV_UDP)
        {
            Contract.Requires(allocator != null);

            this.allocator   = allocator;
            this.pendingRead = new PendingRead();
        }
示例#2
0
        internal Pipeline(StreamHandle streamHandle, PooledByteBufferAllocator allocator)
        {
            Debug.Assert(streamHandle is object);
            Debug.Assert(allocator is object);

            _streamHandle = streamHandle;
            _allocator    = allocator;
            _receiveBufferSizeEstimate = new ReceiveBufferSizeEstimate();
            _pendingRead = new PendingRead();
        }
示例#3
0
        internal Pipeline(StreamHandle streamHandle, PooledByteBufferAllocator allocator)
        {
            Contract.Requires(streamHandle != null);
            Contract.Requires(allocator != null);

            this.streamHandle = streamHandle;
            this.allocator    = allocator;
            this.receiveBufferSizeEstimate = new ReceiveBufferSizeEstimate();
            this.pendingRead = new PendingRead();
        }
示例#4
0
        internal Udp(LoopContext loop, PooledByteBufferAllocator allocator)
            : base(loop, uv_handle_type.UV_UDP)
        {
            if (allocator is null)
            {
                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.allocator);
            }

            _allocator   = allocator;
            _pendingRead = new PendingRead();
        }