Groups
Groups
Sign in
Groups
Groups
Netty discussions
Conversations
About
Send feedback
Help
Quick question before they shut down google groups
34 views
Skip to first unread message
goodnews...@gmail.com
unread,
Mar 21, 2019, 6:02:49 PM
3/21/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Netty discussions
Is this server good for high traffic loads of thousands of users?
Should I be concerned about my lock condition dropping packets?
EventLoopGroup bossGroup = new NioEventLoopGroup(1); // (1)
//EventLoopGroup.shutdownGracefully();
EventLoopGroup workerGroup = new NioEventLoopGroup(2);
try {
ServerBootstrap b = new ServerBootstrap(); // (2)
b.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class) // (3)
.childHandler(new ChannelInitializer<SocketChannel>() { // (4)
@Override
public void initChannel(SocketChannel ch) throws Exception {
lock.lock();
dshstoreToBeCompiled.add(new DiscardServerHandler(t1));
ch.pipeline().addLast(dshstoreToBeCompiled.get(dshstoreToBeCompiled.size()-1));
if(lock.isHeldByCurrentThread())
lock.unlock();
}
})
.option(ChannelOption.SO_BACKLOG, 128) // (5)
.childOption(ChannelOption.SO_KEEPALIVE, true); // (6)
ChannelFuture f = b.bind(port).sync(); // (7)
while(true)
{
prewild();
wildloop();
System.out.println("Safe Exception");
}
}
Reply all
Reply to author
Forward
0 new messages