01e3bcf30c
Motivation: Websocket clients can request to speak a specific subprotocol. The list of subprotocols the client understands are sent to the server. The server should select one of the protocols an reply this with the websocket handshake response. The added code verifies that the reponded subprotocol is valid. Modifications: Added verification of the subprotocol received from the server against the subprotocol(s) that the user requests. If the user requests a subprotocol but the server responds none or a non-requested subprotocol this is an error and the handshake fails through an exception. If the user requests no subprotocol but the server responds one this is also marked as an error. Addiontionally a getter for the WebSocketClientHandshaker in the WebSocketClientProtocolHandler is added to enable the user of a WebSocketClientProtocolHandler to extract the used negotiated subprotocol. Result: The subprotocol field which is received from a websocket server is now properly verified on client side and clients and websocket connection attempts will now only succeed if both parties can negotiate on a subprotocol. If the client sends a list of multiple possible subprotocols it can extract the negotiated subprotocol through the added handshaker getter (WebSocketClientProtocolHandler.handshaker().actualSubprotocol()). |
||
---|---|---|
all | ||
buffer | ||
codec | ||
codec-dns | ||
codec-haproxy | ||
codec-http | ||
codec-memcache | ||
codec-mqtt | ||
codec-socks | ||
codec-stomp | ||
common | ||
example | ||
handler | ||
license | ||
microbench | ||
tarball | ||
testsuite | ||
transport | ||
transport-native-epoll | ||
transport-rxtx | ||
transport-sctp | ||
transport-udt | ||
.fbprefs | ||
.gitignore | ||
.travis.yml | ||
CONTRIBUTING.md | ||
LICENSE.txt | ||
NOTICE.txt | ||
pom.xml | ||
README.md | ||
run-example.sh |
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:
- Latest stable Oracle JDK 7
- Latest stable Apache Maven
- If you are on Linux, you need additional development packages installed on your system, because you'll build the native transport.
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
The 'master' branch is where the development of the latest major version lives on. The development of all other 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.