Make clear how to use HTTPS in the helloworld example
This commit is contained in:
parent
023201f684
commit
4e604a6553
@ -25,6 +25,11 @@ public class HttpHelloWorldServerInitializer extends ChannelInitializer<SocketCh
|
|||||||
public void initChannel(SocketChannel ch) throws Exception {
|
public void initChannel(SocketChannel ch) throws Exception {
|
||||||
ChannelPipeline p = ch.pipeline();
|
ChannelPipeline p = ch.pipeline();
|
||||||
|
|
||||||
|
// Uncomment the following line if you want HTTPS
|
||||||
|
//SSLEngine engine = SecureChatSslContextFactory.getServerContext().createSSLEngine();
|
||||||
|
//engine.setUseClientMode(false);
|
||||||
|
//p.addLast("ssl", new SslHandler(engine));
|
||||||
|
|
||||||
p.addLast("codec", new HttpServerCodec());
|
p.addLast("codec", new HttpServerCodec());
|
||||||
p.addLast("handler", new HttpHelloWorldServerHandler());
|
p.addLast("handler", new HttpHelloWorldServerHandler());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user