Netty project - an event-driven asynchronous network application framework
Java C Shell Groovy Protocol Buffer C++
Latest commit 149916d Aug 10, 2016 Roger Kapsi committed with Scottmitch Adding ability omit the implicit #flush() call in EmbeddedChannel#wri…
…teOutbound() 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.
Permalink
Failed to load latest commit information.
all [maven-release-plugin] prepare for next development iteration Aug 26, 2016
buffer [#5833] Ensure direct memory is released when DirectPoolArena is coll… Sep 23, 2016
codec-dns Add support for Client Subnet in DNS Queries (RFC7871) Sep 6, 2016
codec-haproxy [maven-release-plugin] prepare for next development iteration Aug 26, 2016
codec-http HttpObjectDecoder resetRequested not updated after reset Sep 22, 2016
codec-http2 Complete documentation of StreamBufferingEncoder. Sep 23, 2016
codec-memcache [maven-release-plugin] prepare for next development iteration Aug 26, 2016
codec-mqtt [maven-release-plugin] prepare for next development iteration Aug 26, 2016
codec-redis [maven-release-plugin] prepare for next development iteration Aug 26, 2016
codec-smtp [maven-release-plugin] prepare for next development iteration Aug 26, 2016
codec-socks NetUtil.bytesToIpAddress bug Sep 23, 2016
codec-stomp [maven-release-plugin] prepare for next development iteration Aug 26, 2016
codec-xml [maven-release-plugin] prepare for next development iteration Aug 26, 2016
codec MessageAggregator Potential Leak Sep 14, 2016
common NetUtil.bytesToIpAddress bug Sep 23, 2016
example Fix IndexOutOfBoundsException in HelloWorldHttp2Handler Sep 16, 2016
handler-proxy [maven-release-plugin] prepare for next development iteration Aug 26, 2016
handler Consolidate flushes even when no read in progress Sep 23, 2016
license added support for Protobuf codec nano runtime Jan 19, 2016
microbench Reduce bytecode size of PlatformDependent0.equals. Sep 9, 2016
resolver-dns Add support for Client Subnet in DNS Queries (RFC7871) Sep 6, 2016
resolver [maven-release-plugin] prepare for next development iteration Aug 26, 2016
tarball [maven-release-plugin] prepare for next development iteration Aug 26, 2016
testsuite-osgi [maven-release-plugin] prepare for next development iteration Aug 26, 2016
testsuite [#5800] Support any FileRegion implementation when using epoll transport Sep 16, 2016
transport-native-epoll [#5800] Support any FileRegion implementation when using epoll transport Sep 16, 2016
transport-rxtx Remove @Deprecated for primitive WriteWaterMark getters and setters Sep 5, 2016
transport-sctp Improve SctpMessageCompletionHandler Sep 19, 2016
transport-udt Remove @Deprecated for primitive WriteWaterMark getters and setters Sep 5, 2016
transport Adding ability omit the implicit #flush() call in EmbeddedChannel#wri… Sep 24, 2016
.fbprefs Updated Find Bugs configuration Mar 4, 2009
.gitignore Use shaded dependency on JCTools instead of copy and paste Jun 10, 2016
.travis.yml Travis CI branch whitelisting Mar 11, 2013
CONTRIBUTING.md Move the pull request guide to the developer guide Mar 12, 2014
LICENSE.txt Relicensed to Apache License v2 Aug 28, 2009
NOTICE.txt added support for Protobuf codec nano runtime Jan 19, 2016
README.md Updating Branches to look section to match the current branching stru… Mar 10, 2016
pom.xml Fix typo for max leak records system property Sep 22, 2016
run-example.sh Add an example client for codec-redis Apr 23, 2016

README.md

Netty Project

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

Links

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.