5 Commits

Author SHA1 Message Date
Max Gortman 5865d225df Fixes #225
extra: flaky test fixes
2017-05-15 11:22:41 -07:00
Max Gortman 8ab8c8bf0c porting removal of invoker, better decoupling (#125)
Motivation:
Catching up on recent netty changes, simplifying data flow through channel pipeline

Modifications:
- Replaced IChannelHandlerInvoker with direct methods on IChannelHandlerContext implementation.
- Ported changes in AbstractChannel, DefaultChannelPipeline, etc. to reduce coupling through casting.

Result:
IChannelHandlerInvoker is removed, perf improved, it is easier to implement IChannel or IChannelPipeline from scratch.
2016-06-13 12:32:06 -07:00
Max Gortman 1a80817c71 Enables multi-buffer send in TcpSocketChannel. Remove constraints on IByteBuffer for writing.
Motivation:
In order to avoid buffer copies and yet perform IO efficiently,
it is essential to support sending multiple byte sequences in one call.
Also there should be no additional constraints on IByteBuffer implementations
in order to be accepted by TcpSocketChannel for sending.

Modifications:
- IoBufferCount, GetIoBuffer(), GetIoBuffers() are ported to IByteBuffer and implementations.
- ChannelOutboundBuffer is extended to leverage *IoBuffer* members in order to prepare buffer batches for sending.
- TcpSocketChannel and its ancestors were extended to support sending (sync and async) a list of array segments.
- Extra: fixes WriterIndex positioning in ByteBufferUtil.EncodeString(..).
- Extra: TLS support and exception reporting in benchmark (commented out).
- Extra: fixes async send path in TcpSocketChannel and AbstractSocketChannel.

Result:
A benchmark of single client channel writing to a single server channel runs 3 times faster at 150K op/sec (vs 53K op/sec before) with no increase in CPU consumption.
CompositeByteBuffer can be used directly in IChannel.WriteAsync.
2016-05-12 18:42:54 -07:00
Max Gortman 47163fde8d switching to C# 6.0 2016-05-05 01:19:49 -07:00
Aaron Stannard 2f3cef46d7 implemented embedded channel close #3
brought AbstractContextHandler up to code
EmbeddedChannelTest passes
fixed LengthFieldBasedFrameDecoder
finished LengthFieldPrepender
finished SwappedByteBuffer
2015-11-05 09:39:21 -08:00