public class SampleWebServer extends WebSocketHttpServer
contentRoot, logger, session| Constructor and Description |
|---|
SampleWebServer(File contentRoot) |
| Modifier and Type | Method and Description |
|---|---|
protected ClientSession |
createNewSession() |
static void |
main(String[] args) |
void |
onBinaryMessage(io.netty.channel.ChannelHandlerContext ctx,
byte[] buffer) |
void |
onClose(io.netty.channel.ChannelHandlerContext ctx) |
void |
onHttpRequest(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest req,
NettyWSHttpServer.HttpResponseSender sender) |
void |
onTextMessage(io.netty.channel.ChannelHandlerContext ctx,
String text) |
getSession, isAutoFlush, onOpen, onPong, removeSession, sendHttpGetResponse, sendWSBinaryMessage, sendWSBinaryMessage, sendWSPingMessage, sendWSTextMessage, serveFile, setAutoFlushpublic SampleWebServer(File contentRoot)
public void onClose(io.netty.channel.ChannelHandlerContext ctx)
onClose in class WebSocketHttpServerpublic void onTextMessage(io.netty.channel.ChannelHandlerContext ctx,
String text)
onTextMessage in class WebSocketHttpServerpublic void onBinaryMessage(io.netty.channel.ChannelHandlerContext ctx,
byte[] buffer)
onBinaryMessage in class WebSocketHttpServerpublic void onHttpRequest(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest req,
NettyWSHttpServer.HttpResponseSender sender)
onHttpRequest in class WebSocketHttpServerprotected ClientSession createNewSession()
createNewSession in class WebSocketHttpServerCopyright © 2014. All rights reserved.