Skip to content

Commit

Permalink
Added documentation to websocket classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
veebs authored and Norman Maurer committed Dec 13, 2012
1 parent 2903b91 commit 2704efc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@
import static io.netty.handler.codec.http.HttpVersion.*;

/**
* Handles WebSocket control frames (Close, Ping, Pong) and data frames (Text and Binary) are passed
* to the next handler in the pipeline.
* This handler does all the heavy lifting for you to run a websocket server.
*
* It takes care of websocket handshaking as well as processing of control frames (Close, Ping, Pong). Text and Binary
* data frames are passed to the next handler in the pipeline (implemented by you) for processing.
*
* See <tt>io.netty.example.http.websocketx.html5.WebSocketServer</tt> for usage.
*
* The implementation of this handler assumes that you just want to run a websocket server and not process other types
* HTTP requests (like GET and POST). If you wish to support both HTTP requests and websockets in the one server, refer
* to the <tt>io.netty.example.http.websocketx.server.WebSocketServer</tt> example.
*/
public class WebSocketServerProtocolHandler extends ChannelInboundMessageHandlerAdapter<WebSocketFrame> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,12 @@
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.ssl.SslHandler;
import io.netty.logging.InternalLogger;
import io.netty.logging.InternalLoggerFactory;

/**
* Handles the HTTP handshake (the HTTP Upgrade request)
* Handles the HTTP handshake (the HTTP Upgrade request) for {@link WebSocketServerProtocolHandler}.
*/
public class WebSocketServerProtocolHandshakeHandler extends ChannelInboundMessageHandlerAdapter<HttpRequest> {

private static final InternalLogger logger =
InternalLoggerFactory.getInstance(WebSocketServerProtocolHandshakeHandler.class);
private final String websocketPath;
private final String subprotocols;
private final boolean allowExtensions;
Expand Down

0 comments on commit 2704efc

Please sign in to comment.