1 package org.opendaylight.controller.sal.streams.websockets;
3 import io.netty.channel.ChannelInitializer;
4 import io.netty.channel.ChannelPipeline;
5 import io.netty.channel.socket.SocketChannel;
6 import io.netty.handler.codec.http.HttpObjectAggregator;
7 import io.netty.handler.codec.http.HttpServerCodec;
9 public class WebSocketServerInitializer extends ChannelInitializer<SocketChannel> {
12 protected void initChannel(SocketChannel ch) throws Exception {
13 ChannelPipeline pipeline = ch.pipeline();
14 pipeline.addLast("codec-http", new HttpServerCodec());
15 pipeline.addLast("aggregator", new HttpObjectAggregator(65536));
16 pipeline.addLast("handler", new WebSocketServerHandler());