类 | 说明 |
---|---|
SpdyOrHttpHandler |
Negotiates with the browser if SPDY or HTTP is going to be used.
|
SpdyServer |
A SPDY Server that responds to a GET request with a Hello World.
|
SpdyServerHandler |
HTTP handler that responds with a "Hello World"
|
SpdyServerInitializer |
Sets up the Netty pipeline
|
This package relies on the Jetty project's implementation of the Transport Layer Security (TLS) extension for Next Protocol Negotiation (NPN) for OpenJDK 7 is required. NPN allows the application layer to negotiate which protocol, SPDY or HTTP, to use.
To start, run SpdyServer
with the JVM parameter:
java -Xbootclasspath/p:<path_to_npn_boot_jar> ...
.
The "path_to_npn_boot_jar" is the path on the file system for the NPN Boot Jar file which can be downloaded from
Maven at coordinates org.mortbay.jetty.npn:npn-boot. Different versions applies to different OpenJDK versions.
See Jetty docs for more
information.
You may also use the run-example.sh
script to start the server from the command line:
./run-example spdy-server
Once started, you can test the server with your SPDY enabled web browser by navigating to https://localhost:8443/