0

I'm using netty 4.0.36-Final and I'm trying to set the SO_BACKLOG option on a channel. My simple goal is to have a server that refuse all the connections. In order to have this I thought that would have been enough setting AUTO_READ to false and SO_BACKLOG to 0.

ServerBootstrap b = new ServerBootstrap();
b.group(serverConfiguration.getParentGroup(), serverConfiguration.getChildGroup()).channel(EpollServerSocketChannel.class).childHandler(channelIntializer);

I'm setting the SO_BACKLOG option as a childOption but as soon as I send requests to the server I see this message:

WARN  io.netty.bootstrap.ServerBootstrap - Unknown channel option: SO_BACKLOG=0

I debug a little and the reason why is unknown is because the child.config() method return an instance of io.netty.channel.epoll.EpollSocketChannelConfig instead of io.netty.channel.epoll.EpollServerChannelConfig

What am I doing wrong? Thanks.

0 Answers0