Commit Graph

4080 Commits

Author SHA1 Message Date
Norman Maurer
ccb5409f58 [#884] Split SCTP transport into extra module 2013-01-03 22:19:06 +01:00
Norman Maurer
37a3f2e3b8 [#887] [#866] [#883] Add unified interface for Message oriented protocols and also use direct buffers for them 2013-01-03 18:15:53 +01:00
Trustin Lee
4a1aa37773 Re-ignore ServerSocketSuspendTest (unignored by mistake) 2013-01-03 17:07:30 +09:00
Trustin Lee
0abfaf20e4 Revert 5161ca733c 2013-01-03 17:05:18 +09:00
Trustin Lee
923dde7a5f Do not auto-start read operation 2013-01-03 16:01:41 +09:00
Trustin Lee
103edc4467 Make ChannelConfig.setAutoRead() triggers Channel.read() if autoRead was previously false
- also rename JDK socket and channel variables so that they are less ambiguous
2013-01-01 16:49:21 +09:00
Trustin Lee
218afba1f2 Do not set 'Content-Encoding' if the target encoding is 'identity'
- Fixes #769
2013-01-01 15:13:35 +09:00
Trustin Lee
7d80182e51 Fix a bug where SslHandler does not respect the startTls flag
- Fixes #856
- Add a dedicated test case: SocketStartTlsTest
2013-01-01 15:03:37 +09:00
Trustin Lee
2960af851a Extract the utility classes related with SSL to the util package 2013-01-01 14:04:37 +09:00
Norman Maurer
5161ca733c Move utility method to abstract base class and correctly handle expand of buffer also for OIO 2012-12-31 22:09:27 +01:00
Trustin Lee
89a16fe01e Fix a bug in NIO transport where inboundBufferSuspended() is triggered even if the channel is closed.
- No non-static wildcard import
2013-01-01 00:35:44 +09:00
Trustin Lee
93fd73fbbf Fix a bug in AioSocketChannel where inboundBufferSuspended() is triggered even if the channel is closed. 2013-01-01 00:27:30 +09:00
Norman Maurer
8cf9f52919 Add new ChanelFuureListener impl that mimic the old behavior of Netty 3 and so allow to also call fireException for outbound operations 2012-12-31 16:17:08 +01:00
Trustin Lee
1e9652b47a Fix a bug in AioSocketChannel where recursive doBeginRead() is allowed unexpectedly 2013-01-01 00:08:58 +09:00
Norman Maurer
e0a6dc0ac3 Remove ChannelFutureProgressListener 2012-12-31 23:27:37 +09:00
Norman Maurer
4e77bacdf7 [#873] [#868] Split ChannelFuture into ChannelFuture and ChannelPromise 2012-12-31 23:27:16 +09:00
Trustin Lee
0909878581 Read only when requested (read-on-demand)
This pull request introduces a new operation called read() that replaces the existing inbound traffic control method. EventLoop now performs socket reads only when the read() operation has been issued. Once the requested read() operation is actually performed, EventLoop triggers an inboundBufferSuspended event that tells the handlers that the requested read() operation has been performed and the inbound traffic has been suspended again. A handler can decide to continue reading or not.

Unlike other outbound operations, read() does not use ChannelFuture at all to avoid GC cost. If there's a good reason to create a new future per read at the GC cost, I'll change this.

This pull request consequently removes the readable property in ChannelHandlerContext, which means how the traffic control works changed significantly.

This pull request also adds a new configuration property ChannelOption.AUTO_READ whose default value is true. If true, Netty will call ctx.read() for you. If you need a close control over when read() is called, you can set it to false.

Another interesting fact is that non-terminal handlers do not really need to call read() at all. Only the last inbound handler will have to call it, and that's just enough. Actually, you don't even need to call it at the last handler in most cases because of the ChannelOption.AUTO_READ mentioned above.

There's no serious backward compatibility issue. If the compiler complains your handler does not implement the read() method, add the following:

public void read(ChannelHandlerContext ctx) throws Exception {
    ctx.read();
}

Note that this pull request certainly makes bounded inbound buffer support very easy, but itself does not add the bounded inbound buffer support.
2012-12-31 23:26:00 +09:00
Norman Maurer
926a20f105 [#880] correctly use methods which take a ChannelFuture as parameter 2012-12-31 11:43:05 +01:00
Norman Maurer
b49b3d9c56 [#879] Notify correct ChannelFuture for queued FileRegions 2012-12-31 11:35:25 +01:00
Norman Maurer
5aa679fec7 [#840] Generate the tarball with top level directory 2012-12-30 21:26:08 +01:00
Norman Maurer
c80b1bb66e [#872] AbstractNioByteChannel and AbstractNioMessageChannel should be public 2012-12-30 12:48:32 +01:00
alexey
738d382fbc Added test cases for NetUtil methods, if we can`t convertAddress we return null 2012-12-29 18:31:53 +01:00
Norman Maurer
0fb0037eab Rename IpAddresses to NetUtil 2012-12-29 18:25:32 +01:00
Norman Maurer
5d13c7d27b Merge IPUtil and NetworkConstants into IpAddresses and also make naming of methods consistent 2012-12-29 18:17:33 +01:00
Norman Maurer
213c1e3d23 Replace sun.net.util.IPAddressUtil usage with own implementation 2012-12-29 18:13:44 +01:00
Norman Maurer
e2b240799c [#857] Check if the SelectionKey is valid before access readyOps() 2012-12-29 18:07:02 +01:00
Norman Maurer
64351ad7d6 [#861] Let SctpMessageCompletionHandler fire inboundMessageBufferUpdated() only if needed 2012-12-27 23:08:54 +01:00
Norman Maurer
88838413c7 Javadocs and cleanup intellij warnings 2012-12-27 23:02:13 +01:00
Norman Maurer
a20aba87ab Remove get prefix from Sctp methods to be more inline with the rest 2012-12-27 22:53:42 +01:00
Norman Maurer
6db7250ed9 Javadocs added for SCTP stuff 2012-12-27 22:46:46 +01:00
Norman Maurer
5a4a52a817 [#857] Correctly handle CancelledKeyException 2012-12-27 22:24:07 +01:00
Luke Wood
5adb37de3d Port traffic handler to netty 4 2012-12-26 21:54:40 +01:00
Trustin Lee
85e1684084 Simpler method naming in Timeout 2012-12-26 13:50:01 +09:00
Trustin Lee
6b9f7065a2 Simpler and more comprehensive method naming in monitor 2012-12-26 13:48:29 +09:00
Norman Maurer
852f546b5b [#846] Tighten up visibility 2012-12-25 18:54:55 +01:00
Norman Maurer
5bd3648b3d [#845] Enable PUT of files above 2GB 2012-12-24 21:52:04 +01:00
Norman Maurer
2ea45950f1 Javadoc fixes 2012-12-23 23:03:54 +01:00
Norman Maurer
a9fdb682be Add javadocs and some small cleanups 2012-12-23 20:58:49 +01:00
Norman Maurer
71b089cb3b Add javadocs and cleanup 2012-12-23 19:24:20 +01:00
Norman Maurer
ae859c2de9 Fix checkstyle 2012-12-23 19:24:05 +01:00
Norman Maurer
e0d42df77b ServerBootstrap needs to have a localAddress defined 2012-12-23 16:05:43 +01:00
Norman Maurer
6ef1729d06 Fix javadocs for ChannelPipeline 2012-12-23 15:54:30 +01:00
Norman Maurer
7d79587ade Make package private 2012-12-23 15:54:14 +01:00
Norman Maurer
e05b071b41 Javadocs update 2012-12-22 19:27:09 +01:00
Norman Maurer
fc4b205bc4 More javadocs 2012-12-22 15:53:01 +01:00
Trustin Lee
9098d069b0 Make FailedChannelFuture and SucceededChannelFuture final 2012-12-22 15:10:38 +09:00
Norman Maurer
ff3dcffd49 Almost finish javadocs for codec module 2012-12-21 22:41:18 +01:00
Norman Maurer
b814033323 [#847] Let CompressionException extend CodecException 2012-12-21 22:36:51 +01:00
Norman Maurer
5b44fe6e65 More javadoc fixes 2012-12-21 22:32:16 +01:00
Norman Maurer
8a7bc2c606 Add a lot of javadocs to make usage more clear 2012-12-21 22:22:40 +01:00