1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.testsuite.svm;
17
18 import io.netty.channel.ChannelInitializer;
19 import io.netty.channel.ChannelPipeline;
20 import io.netty.channel.socket.SocketChannel;
21 import io.netty.handler.codec.http.HttpServerCodec;
22 import io.netty.handler.codec.http.HttpServerExpectContinueHandler;
23
24 public class HttpNativeServerInitializer extends ChannelInitializer<SocketChannel> {
25
26 @Override
27 public void initChannel(SocketChannel ch) {
28 ChannelPipeline p = ch.pipeline();
29 p.addLast(new HttpServerCodec());
30 p.addLast(new HttpServerExpectContinueHandler());
31 p.addLast(new HttpNativeServerHandler());
32 }
33 }