use of net.runelite.protocol.update.decoders.HandshakeResponseDecoder in project runelite by runelite.
the class CacheClient method connect.
public void connect() {
Bootstrap b = new Bootstrap();
b.group(group).channel(NioSocketChannel.class).option(ChannelOption.TCP_NODELAY, true).handler(new ChannelInitializer<SocketChannel>() {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
// p.addFirst(new HttpProxyHandler(new InetSocketAddress("runelite.net", 3128)));
p.addLast("decoder", new HandshakeResponseDecoder());
p.addLast(new CacheClientHandler(), new HandshakeResponseHandler(CacheClient.this), new ArchiveResponseHandler(CacheClient.this));
p.addLast(new UpdateHandshakeEncoder(), new EncryptionEncoder(), new ArchiveRequestEncoder());
}
});
// Start the client.
ChannelFuture f = b.connect(host, PORT).syncUninterruptibly();
channel = f.channel();
}
Aggregations