Bill Gallagher
b72761e99c
minor gc optimization: better DefaultSpdyHeaders.iterator()
2013-10-11 20:36:14 +02:00
Bill Gallagher
951a65e57e
minor gc optimization: better DefaultHttpHeaders.iterator()
2013-10-11 20:34:27 +02:00
Norman Maurer
42cce12498
[ #1907 ] LengthFieldPrepender should better extend MessageToMessageEncoder for less memory copies
2013-10-11 06:38:18 +02:00
Trustin Lee
16bf687aec
Ensure the selector implementation can be instrumented before attempting instrumentation
...
- Fixes #1908
2013-10-11 12:07:46 +09:00
Norman Maurer
522dbf8543
[ #1906 ] Use a ByteBuf allocator from the ByteBufAllocator when encode Strings
2013-10-09 21:19:36 +02:00
Trustin Lee
136e1ebba8
Fix compilation errors / Cleanup
2013-10-08 17:20:07 +09:00
Trustin Lee
9097fce9e3
Allow empty handler list when creating a new EmbeddedChannel
...
.. so that it can be used for dynamically initialized pipelines
- Fixes #1899
2013-10-08 17:18:41 +09:00
Trustin Lee
1c15ba0c95
Rename getChildGroup() to childEventLoopGroup() / Minor cleanup
2013-10-08 17:03:50 +09:00
Bill Gallagher
e743a27e75
Pass eventLoop and childEventLoopGroup as Channel constructor parameters
...
- Add ServerChannelFactory for ServerBootstrap which is the counterpart
of ChannelFactory for Bootstrap
2013-10-08 17:03:50 +09:00
Norman Maurer
d91717446b
Remove redundant index check
2013-10-08 07:21:15 +02:00
Norman Maurer
23998048b1
[ #1898 ] No call fireExceptionCaught but just fail the write promise
2013-10-08 06:39:21 +02:00
Norman Maurer
cd2eaebd92
[ #1895 ] Fix IllegalStateException which was produced during failing ChunkedWrite after the channel was closed
2013-10-08 06:36:59 +02:00
Trustin Lee
8864792499
Fixes the problem where the promise of the outbound operation that causes a channel closure is notified after channelInactive()
...
- Fixes #1897
2013-10-08 12:24:32 +09:00
Trustin Lee
3c7d458c6e
Fix the problem where HashedWheelTimer puts a timeout into an incorrect place
...
- the stopIndex of a timeout is calculated based on the start time of the worker thread and the current tick count for greater accuracy
2013-10-07 17:09:00 +09:00
Norman Maurer
f4edb2f689
[ #1893 ] Fix bug in JdkZlibDecoder which did not let it handle large data
2013-10-07 08:07:53 +02:00
Norman Maurer
44293291a7
Use direct ByteBuf for the test to make sure it is not copied
2013-10-07 08:07:38 +02:00
Norman Maurer
7ad3c1e10c
[ #1890 ] Correctly expand ByteBuffer array in all cases
...
The problem was that we did not handle the case correctly when doubling the array was not enough. We need to keep doubling until everything fits in.
2013-10-06 15:30:51 +02:00
Norman Maurer
2366c2846d
[ #1881 ] Use correct field name in NullPointerException
2013-10-04 09:54:21 +02:00
Bill Gallagher
805a9dff8e
disable debugging output during test
2013-10-04 06:58:52 +02:00
Norman Maurer
eb24b572dc
[ #1885 ] Correctly close leak detected also on non started HashedWheelTimer
2013-10-02 06:44:55 +02:00
Norman Maurer
a4a207fc4f
Fix checkstyle
2013-10-02 06:44:10 +02:00
Bill Gallagher
a5220198ba
use enum for state in LocalChannel
2013-10-02 06:32:03 +02:00
Bill Gallagher
f80109f423
use enum for state in EmbeddedChannel
2013-10-01 21:08:45 +02:00
Norman Maurer
4bca1c3fe3
[ #1876 ] Make use of proper state machine in WebSocket08FrameDecoder for performance reasons
2013-10-01 10:20:01 +02:00
Norman Maurer
1ecd1e01a5
[ #1880 ] Use ByteBufAllocator when read bytes into new chunks
2013-10-01 09:27:02 +02:00
Norman Maurer
5a59cb9fb7
[ #1879 ] Correctly validate close frame
2013-10-01 07:32:07 +02:00
Norman Maurer
aaafdf909d
[ #1878 ] Fix leak of ByteBuf when masked payload is used
2013-10-01 07:18:16 +02:00
Norman Maurer
328f67fdfe
[ #1874 ] WebSocket08FrameDecoder may leak memory if channel is closed before the full frame was received
2013-09-30 20:43:30 +02:00
Bill Gallagher
20d5361403
[ #1832 ] - Channel writability change notifications sometimes fail to fire
2013-09-30 20:09:28 +02:00
Norman Maurer
512908f993
[ #1875 ] Correctly check the readerIndex when try to read a byte from AbstractByteBuf
2013-09-30 14:49:03 +02:00
Jeff Pinner
321990a115
SPDY: add SPDY/3.1 support
...
- with Michael Schore <mschore@twitter.com>
2013-09-28 12:58:44 +02:00
Norman Maurer
c2101d3c56
Cache underlying ByteBuffers and count in ChannelOutboundBuffer.Entry to reduce object creation and so GC pressure
...
Beside this it also helps to reduce CPU usage as nioBufferCount() is quite expensive when used on CompositeByteBuf which are
nested and contains a lot of components
2013-09-26 21:01:40 +02:00
Norman Maurer
fc805a0787
CompositeByteBuf.isDirect() should return true if its only backed by direct buffers
2013-09-26 20:50:59 +02:00
Norman Maurer
213d195909
[ #1865 ] Only use internalNioBuffer when one of the read* or write* methods are used. This is neccessary to prevent races as those can happen when a slice or duplicate is shared between different Channels
...
that are not assigned to the same EventLoop. In general get* operations should always be safe to be used from different Threads.
This aslo include unit tests that show the issue
2013-09-25 17:18:47 +02:00
Norman Maurer
52660dfcfa
Propagate channelWritabilityChanged() through the pipeline after flushing. Related to [ #1861 ]
2013-09-24 14:19:53 +02:00
Norman Maurer
f35ba4f80f
Correctly handle automatically suspend/resume in ChunkedWriteHandler. Related to [ #1861 ]
...
The old implementation was broken and could lead to pending message never be picked up again until the user either explicit called flush or
resumeTransfer().
2013-09-24 14:19:38 +02:00
Norman Maurer
cd5f9a2212
Introduce a new ChannelOption called DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION. Related to [ #1830 ]
...
This ChannelOption allows to tell the DatagramChannel implementation to be active as soon as they are registrated to their EventLoop. This can be used to make it possible to write to a not bound DatagramChannel.
The ChannelOption is marked as @deprecated as I'm looking for a better solution in master which breaks default behaviour with 4.0 branch.
2013-09-24 11:51:54 +02:00
Norman Maurer
5aa2b7e9f7
[ #1855 ] Try to calculate the correct amount of written bytes to update the ChannelProgressiveFuture
2013-09-24 07:50:02 +02:00
Arron Norwell
5a0d7fe19a
HttpRequestEncoder should append '/' to absolute path requests only when needed
2013-09-22 13:57:10 +02:00
Norman Maurer
1c7e107bef
[ #1851 ] EmptyByteBuf.isWritable(..) and isReadable(...) should not throw IndexOutOfBoundsException
2013-09-21 20:40:08 +02:00
Sasha Zverev
71c062167d
Slip in DefaultOioSocketChannelConfig (setAllowHalfClosure used to ignore argument)
2013-09-21 20:14:12 +02:00
Norman Maurer
a855f19ad6
[ #1853 ] Optimize gathering writes for CompositeByteBuf that are only backed by one ByteBuffer
2013-09-19 07:29:21 +02:00
Norman Maurer
0e1dcb91ff
[ #1852 ] Fix bug in UnpooledDirectByteBuf.nioBuffer(...) implementation
2013-09-18 20:48:40 +02:00
Norman Maurer
3cfcf09af8
More efficient handling of incomplete writes.
...
The problem with the old way was that we always set the OP_WRITE when the buffer could not be written
until the write-spin-count was reached. This means that in some cases the channel was still be writable
but we just was not able to write out the data quick enough. For this cases we should better break out the
write loop and schedule a write to be picked up later in the EventLoop, when other tasks was executed.
The OP_WRITE will only be set if a write actual returned 0 which means there is no more room for writing data
and this we need to wait for the os to notify us.
2013-09-17 07:01:05 +02:00
Norman Maurer
8dc57f6933
[ #1836 ] Add comment to explain why read is triggered
2013-09-17 06:58:23 +02:00
Greg Soltis
335f3807a5
Fix nioBuffer implementation for CompositeByteBuf
2013-09-16 06:57:32 +02:00
Norman Maurer
c0b9ef9386
[ #1833 ] Add testcase for fix
2013-09-14 11:53:30 +02:00
Phillip Schichtel
d885394b8a
[ #1833 ] Replace ; with & only in the QueryString and not the whole URI
2013-09-14 11:52:39 +02:00
Trustin Lee
4aab9e0773
No need to use an unreleasable buffer - just wrap an array
2013-09-13 14:09:51 -07:00
Norman Maurer
87a6a68059
[ #1830 ] Add testcase for write to not bound DatagramChannel impls and revert change in OIO as it breaks things as the udnerlying socket lazy binds
2013-09-12 09:29:40 +02:00