Commit Graph

4654 Commits

Author SHA1 Message Date
Norman Maurer
fd3f923b52 Allow to specify the used buffer type for ChannelInboundByteBufHandler and ChannelOutboundByteBufHandler by configuration. As default it tries to use a direct ByteBuf 2013-03-08 08:20:46 +01:00
Trustin Lee
a9a29bdf3f Use I/O buffer whenever possible now that our direct buffers are as fast as heap buffers 2013-03-08 11:21:08 +09:00
Trustin Lee
63116239ac Always use EmptyByteBuf when a user attempts to construct a buffer with 0 maxCapacity / Make EmptyByteBuf remember the allocator it came from / Optimize EmptyByteBuf a little bit 2013-03-08 11:03:11 +09:00
Trustin Lee
096e4c95ef Fix checkstyle 2013-03-08 10:39:52 +09:00
Trustin Lee
12f1d96914 Relaxed memory access constraint of ReferenceCounted.refCnt() for potentially better performance / More precise reference counting for MessageBuf 2013-03-08 10:32:20 +09:00
Norman Maurer
6ac9b17ddd Make WebSocket codec also work when HttpClientCodec and HttpServerCodec is used.
Also refactor the handshakers to share more code and make it easier to implement a new one and less error-prone
2013-03-08 08:46:47 +09:00
Trustin Lee
41ab17b9bf Fix inspection warnings in HashedWheelTimer 2013-03-08 08:45:17 +09:00
Trustin Lee
16f4de7adb Use the original stack trace when translating SocketTimeoutException to ConnectTimeoutException 2013-03-08 08:40:28 +09:00
Prajwal Tuladhar
e66fc219ff port fix from Akka for HashedWheelTimer
Ported from commits:

* cb4e3536b0
* 7e590f3071
2013-03-08 08:25:37 +09:00
Norman Maurer
61d6c48365 [#1036] Add special ConnectTimeoutException which is thrown if a connection failed because of a timeout 2013-03-07 20:53:45 +01:00
Norman Maurer
9599bfd569 Fix class-cast exception which is a regression introduces in 256c931db2 2013-03-07 11:11:37 +01:00
Trustin Lee
526dafca75 Fix checkstyle 2013-03-07 16:13:44 +09:00
Norman Maurer
88cc8c1739 [#1065] Provide Future/Promise without channel reference 2013-03-07 07:21:37 +01:00
Trustin Lee
0f8fbac9f8 Fix a problem in SslHandler where it doesn't work with TLS False Start
.. as suggested by @justinsb
2013-03-07 12:51:07 +09:00
Trustin Lee
148abe52f9 Reduce the amount of memory used for handler names
- Fixes #1123
2013-03-07 12:43:16 +09:00
Trustin Lee
303f83043b Fix checkstyle 2013-03-06 18:23:08 +09:00
Trustin Lee
88df53ec1a Fix infinite recursion when transferring data between different type of buffers / Add ByteBuf.hasMemoryAddress/memoryAddress()
- Fixes: #1109 and #1110
2013-03-06 18:22:16 +09:00
Trustin Lee
3d6d9f394d Fix checkstyle 2013-03-06 17:10:26 +09:00
Trustin Lee
81ce0555e6 Add UnpooledUnsafeDirectByteBuf and use it when low-level access is available
- Remove PooledUnsafeDirectByteBuf.setMedium() which is redundant
- Fix constructor visibility
2013-03-06 16:01:46 +09:00
Trustin Lee
6c3d5ed907 Use _set* in AbstractByteBuf.write*() 2013-03-06 14:56:27 +09:00
Trustin Lee
1c1570ffc4 Make field access via ByteBuf.read/write*() faster by avoiding unnecessary boundary checks
- also disabled a time consuming test that is actually a regression test
2013-03-06 10:32:29 +09:00
Trustin Lee
5f2c2cdc9b Fix a bug in PoolArena and PoolSubpage where subpage pools are not updated correctly
- Make PoolSubpage a linked list node in the pool
- Now that a subpage is added to and removed from the pool correctly, allocating a subpage from the pool became vastly simpler.
2013-03-05 23:55:41 +09:00
Trustin Lee
6e5bb87219 Re-enable some critical tests 2013-03-05 18:42:34 +09:00
Trustin Lee
c5f606e632 Warn in case of incomplete low-level API 2013-03-05 18:06:01 +09:00
Trustin Lee
4cb023f190 Add more variants of ByteBufAllocator.ioBuffer() / Update Javadoc 2013-03-05 17:59:31 +09:00
Trustin Lee
8d88acb4a7 Change ByteBufAllocator.buffer() to allocate a direct buffer only when the platform can handle a direct buffer reliably
- Rename directbyDefault to preferDirect
 - Add a system property 'io.netty.prederDirect' to allow a user from changing the preference on launch-time
 - Merge UnpooledByteBufAllocator.DEFAULT_BY_* to DEFAULT
2013-03-05 17:55:24 +09:00
Trustin Lee
a8a7c4f576 Provide a way to implement an ChannelInbound/OutboundMessageHandler conveniently without extending an adapter class
- Add ChannelHandlerUtil and move the core logic of ChannelInbound/OutboundMessageHandler to ChannelHandlerUtil
- Add ChannelHandlerUtil.SingleInbound/OutboundMessageHandler and make ChannelInbound/OutboundMessageHandlerAdapter implement them.  This is a backward incompatible change because it forces all handler methods to be public (was protected previously)
- Fixes: #1119
2013-03-05 17:27:53 +09:00
Trustin Lee
307e6c47d8 Make hasUnsafe() return true only when all necessary low level operations are available for reliable direct buffer access 2013-03-05 17:25:54 +09:00
Norman Maurer
256c931db2 Move exceptionCaught(..) back to ChannelHandler. Related to [#1118] 2013-03-05 07:34:34 +01:00
Norman Maurer
faaff91dd0 Fix checkstyle 2013-03-05 07:06:52 +01:00
Trustin Lee
7e17f71b30 Make PlatformDependent work with the platforms without unaligned access support 2013-03-05 14:27:52 +09:00
Trustin Lee
e4aa941bd4 Simplify ChannelInboundMessageHandlerAdapter.inboundBufferUpdated() implementation 2013-03-05 12:22:57 +09:00
Trustin Lee
0e3825899a Move DefaultChannelPipeline.notifyHandlerException() to DefaultChannelHandlerContext / Always trigger exceptionCaught() at the handler that raised an exception
- Related: #1118
2013-03-05 12:13:14 +09:00
Norman Maurer
1603d9792d Move methods from ChannelHandler to ChannelStateHandler like proposed in [#1107] 2013-03-04 07:28:10 +01:00
Norman Maurer
3ac78b030a Improve javadocs 2013-03-01 22:30:45 +01:00
Norman Maurer
03525f4b64 Fix javadocs 2013-03-01 21:42:08 +01:00
Norman Maurer
42dad6d9d4 [#1106] Also handle FileRegion in ByteToByteEncoder and SslHandler 2013-02-28 19:40:34 +01:00
Trustin Lee
881bd8eea3 Support array types in JavassistTypeParameterMatcherGenerator 2013-02-28 10:37:55 -08:00
Trustin Lee
b712b030fa Fix a bug where TypeParameterMatcher fails when a type parameter is an array
- Fixes #1103
2013-02-28 10:29:03 -08:00
Justin Santa Barbara
6246825fda [#1100 ] Fix SPDY codec to work again in 4.x 2013-02-28 11:35:38 +01:00
Norman Maurer
b6038534cc [#1101] Fix NPE which accour when send a 100-continue response and using the HttpContentEncoder 2013-02-28 07:13:21 +01:00
Norman Maurer
977b6f3a28 [#1101] Fix NPE which accour when send a 100-continue response and using the HttpContentDecoder 2013-02-28 07:06:39 +01:00
Trustin Lee
d4d01ba52c Optimize SlicedByteBuf a little bit 2013-02-27 15:19:25 -08:00
Norman Maurer
cb202da832 [#1036] Use SocketTimeoutException when a connection timeout is detected to make it easier to detect timeout vs refused 2013-02-27 10:19:26 +01:00
Norman Maurer
dc4c4ab6b9 [#1094] Fix possible StackOverFlowError when send FileRegions via the AioSocketChannel 2013-02-27 07:52:42 +01:00
Norman Maurer
71f25d13e2 [#1095] Fix AioCompletionHandler stackoverflow detection to executed callback methods in all cases 2013-02-27 07:52:01 +01:00
Trustin Lee
49aa907bd0 [maven-release-plugin] prepare for next development iteration 2013-02-26 16:55:07 -08:00
Trustin Lee
5026c2f359 [maven-release-plugin] prepare release netty-4.0.0.Beta2 2013-02-26 16:54:53 -08:00
Trustin Lee
d7b782ab7b Add examples to Xref 2013-02-26 16:48:01 -08:00
Trustin Lee
bfbd4da1a5 We actually need Xref for source browsing. We just don't need it for example browsing. 2013-02-26 16:42:10 -08:00