Reputation: 61
How do I set SO_TIMEOUT on serverbootstrap. I want to wait only for a certain period of time for accepting connection. sb.setOption(ChannelOption.SO_TIMEOUT,5000) doesnt have any effect/
Upvotes: 0
Views: 138
Reputation: 12351
SO_TIMEOUT
property is only the the OIO transport. It has no effect on other transports like NIO and epoll transport.
Even if you used it with the OIO transport, it will not yield the behavior you expect. You have to just close the server channel after a certain period of time.
Upvotes: 1