Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop netty from listening and accepting on server socket

Tags:

netty

Is there a way to tell netty to stop listening and accepting new connections on a socket, but to finish up any ongoing job on current connections?

like image 387
user1495282 Avatar asked Jul 02 '12 06:07

user1495282


1 Answers

You can just close the ServerSocketChannel created by the ChannelFactory. Usually, the ServerSocketChannel is returned by ServerBootstrap.bind().

like image 193
trustin Avatar answered Sep 29 '22 07:09

trustin