This Repository contains the source-code for all chapters of the book Netty in Action by Norman Maurer and Marvin Allen Wolfthal.
Latest version: https://github.com/normanmaurer/netty-in-action/tree/2.0-SNAPSHOT
Enjoy! Feedback and PR's welcome!
Prerequisites
JDK 1.7.0u71 or better
Maven 3.3.9 or better
If you want to build everything at once, from the top directory run
mvn install
If you want to build only single projects then from the top directory first run
mvn install -pl utils
This will make the utils jar available to all the projects.
This chapter covers
- Networking in Java
- Introducing Netty
- Netty's core components
This chapter covers
- Setting up the development environment
- Writing an Echo server and client
- Building and testing the applications
This chapter covers
- Technical and architectural aspects of Netty
Channel
,EventLoop
, andChannelFuture
ChannelHandler
andChannelPipeline
- Bootstrapping
This chapter covers
- OIO—blocking transport
- NIO—asynchronous transport
- Local transport—asynchronous communications within a JVM
- Embedded transport—testing your
ChannelHandlers
This chapter covers
ByteBuf
— Netty’s data container- API details
- Use cases
- Memory allocation
This chapter covers
- The
ChannelHandler
andChannelPipeline
APIs - Detecting resource leaks
- Exception handling
This chapter covers
- Threading model overview
- Event loop concept and implementation
- Task scheduling
- Implementation details
This chapter covers
- Bootstrapping clients and servers
- Bootstrapping clients from within a
Channel
- Adding
ChannelHandlers
- Using
ChannelOptions
and attributes
This chapter covers
- Unit testing
- Overview of
EmbeddedChannel
- Testing
ChannelHandlers
withEmbeddedChannel
This chapter covers
- An overview of decoders, encoders and codecs
- Netty’s codec classes
This chapter covers
- Securing Netty applications with SSL/TLS
- Building Netty HTTP/HTTPS applications
- Handling idle connections and timeouts
- Decoding delimited and length-based protocols
- Writing big data
This chapter covers
- The concept of a real-time web
- The WebSocket protocol
- Building a WebSocket-based chat room server with Netty
This chapter covers
- An overview of UDP
- A sample broadcasting application