Yep … Thats easy to do.

Just use:

ServerBootstrap bs = new ServerBootstrap();
sb.option(ChannelOption.AUTO_READ, false) ….

And once you want to start accepting use

Channel.config().setAutoRead(true); or 
channel.config().setOption(ChannelOption.AUTO_READ, true);.


> On 1. Dec 2020, at 17:30, Tim Fox <[email protected]> wrote:
> 
> Hey Norman,
> 
> Second question of the day!
> 
> I'm porting an existing server to Netty. I have a requirement where I need to 
> have server sockets bound but not in a state where they will accept 
> connections, i.e. without the OP_ACCEPT registered. AUI, clients that attempt 
> to connect during that time will not fail but will be queued until the server 
> is ready to accept connections.
> 
> Then some time later I want to say "hey now you can start accepting 
> connections", and then register the OP_ACCEPT. Looking at NioServerSocket it 
> seems currently to always start with OP_ACCEPT.
> 
> Any thoughts on how I can achieve this behaviour with Netty?
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Netty discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/netty/dea89732-c6af-44bf-b26d-f21a1e1939c4n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/netty/dea89732-c6af-44bf-b26d-f21a1e1939c4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/576BF957-EEBC-470B-819D-7F0CC133DDBB%40googlemail.com.

Reply via email to