Go to file
Roger Kapsi 149916d052 Adding ability omit the implicit #flush() call in EmbeddedChannel#writeOutbound() and
the implicit #fireChannelReadComplete() in EmbeddedChannel#writeInbound().

Motivation

We use EmbeddedChannels to implement a ProxyChannel of some sorts that shovels
messages between a source and a destination Channel. The latter are real network
channels (such as Epoll) and they may or may not be managed in a ChannelPool. We
could fuse both ends directly together but the EmbeddedChannel provides a nice
disposable section of a ChannelPipeline that can be used to instrument the messages
that are passing through the proxy portion.

The ideal flow looks abount like this:

source#channelRead() -> proxy#writeOutbound() -> destination#write()
source#channelReadComplete() -> proxy#flushOutbound() -> destination#flush()

destination#channelRead() -> proxy#writeInbound() -> source#write()
destination#channelReadComplete() -> proxy#flushInbound() -> source#flush()

The problem is that #writeOutbound() and #writeInbound() emit surplus #flush()
and #fireChannelReadComplete() events which in turn yield to surplus #flush()
calls on both ends of the pipeline.

Modifications

Introduce a new set of write methods that reain the same sematics as the #write()
method and #flushOutbound() and #flushInbound().

Result

It's possible to implement the above ideal flow.

Fix for EmbeddedChannel#ensureOpen() and Unit Tests for it

Some PR stuff.
2016-09-24 12:33:04 -07:00
all [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
buffer [#5833] Ensure direct memory is released when DirectPoolArena is collected 2016-09-23 15:20:59 -07:00
codec MessageAggregator Potential Leak 2016-09-14 10:13:49 -07:00
codec-dns Add support for Client Subnet in DNS Queries (RFC7871) 2016-09-06 07:16:57 +02:00
codec-haproxy [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
codec-http HttpObjectDecoder resetRequested not updated after reset 2016-09-22 10:58:44 -07:00
codec-http2 Complete documentation of StreamBufferingEncoder. 2016-09-23 16:39:31 -07:00
codec-memcache [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
codec-mqtt [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
codec-redis [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
codec-smtp [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
codec-socks NetUtil.bytesToIpAddress bug 2016-09-22 17:06:21 -07:00
codec-stomp [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
codec-xml [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
common NetUtil.bytesToIpAddress bug 2016-09-22 17:06:21 -07:00
example Fix IndexOutOfBoundsException in HelloWorldHttp2Handler 2016-09-16 16:21:53 -07:00
handler Consolidate flushes even when no read in progress 2016-09-23 15:27:03 -07:00
handler-proxy [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
license added support for Protobuf codec nano runtime 2016-01-19 21:39:17 +01:00
microbench Reduce bytecode size of PlatformDependent0.equals. 2016-09-09 07:57:41 +02:00
resolver [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
resolver-dns Add support for Client Subnet in DNS Queries (RFC7871) 2016-09-06 07:16:57 +02:00
tarball [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
testsuite [#5800] Support any FileRegion implementation when using epoll transport 2016-09-15 23:03:37 -07:00
testsuite-osgi [maven-release-plugin] prepare for next development iteration 2016-08-26 10:06:32 +02:00
transport Adding ability omit the implicit #flush() call in EmbeddedChannel#writeOutbound() and 2016-09-24 12:33:04 -07:00
transport-native-epoll [#5800] Support any FileRegion implementation when using epoll transport 2016-09-15 23:03:37 -07:00
transport-rxtx Remove @Deprecated for primitive WriteWaterMark getters and setters 2016-09-05 10:26:05 +02:00
transport-sctp Improve SctpMessageCompletionHandler 2016-09-19 08:23:00 -07:00
transport-udt Remove @Deprecated for primitive WriteWaterMark getters and setters 2016-09-05 10:26:05 +02:00
.fbprefs Updated Find Bugs configuration 2009-03-04 10:33:09 +00:00
.gitignore Use shaded dependency on JCTools instead of copy and paste 2016-06-10 13:19:45 +02:00
.travis.yml Travis CI branch whitelisting 2013-03-11 09:55:43 +09:00
CONTRIBUTING.md Move the pull request guide to the developer guide 2014-03-12 13:13:58 +09:00
LICENSE.txt Relicensed to Apache License v2 2009-08-28 07:15:49 +00:00
NOTICE.txt added support for Protobuf codec nano runtime 2016-01-19 21:39:17 +01:00
pom.xml Fix typo for max leak records system property 2016-09-21 23:15:27 -07:00
README.md Updating Branches to look section to match the current branching structure of the project 2016-03-10 22:08:01 +01:00
run-example.sh Add an example client for codec-redis 2016-04-23 11:18:12 -07:00

Netty Project

Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.

How to build

For the detailed information about building and developing Netty, please visit the developer guide. This page only gives very basic information.

You require the following to build Netty:

Note that this is build-time requirement. JDK 5 (for 3.x) or 6 (for 4.0+) is enough to run your Netty-based application.

Branches to look

Development of all versions takes place in each branch whose name is identical to <majorVersion>.<minorVersion>. For example, the development of 3.9 and 4.0 resides in the branch '3.9' and the branch '4.0' respectively.