Setting SO_TIMEOUT on client socket channel

"이희승 (Trustin Lee)" trustin at gmail.com
Fri Oct 28 13:45:09 EDT 2011


As far as I know, SO_TIMEOUT does not affect the success rate of packet 
deliveries. It just tells how soon socket read() should return before it 
receives data so that the application can do something else till the 
next read() attempt.

Netty uses SO_TIMEOUT internally to check if there is any pending 
setInterestOps() request every second.

HTH

chudak wrote:
 > There doesn't appear to be any way to do this. We can set the connect 
timeout
 > by using the options method of the client bootstrap, e.g.:
 >
 > bootstrap.setOption("connectTimeoutMillis", 30);
 >
 > We can also set other socket options, e.g.:
 >
 > bootstrap.setOption("tcpNoDelay", true);
 >
 > We are running our netty client on a mobile device and in low network
 > coverage situations where we are getting lots of packet loss, especially
 > during the SSL handshake, the connection hangs indefinitely.
 >
 > Any reason this isn't supported, especially for OIO?
 >
 >
 >
 > --
 > View this message in context: 
http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Setting-SO-TIMEOUT-on-client-socket-channel-tp6938557p6938557.html
 > Sent from the Netty User Group mailing list archive at Nabble.com.
 > _______________________________________________
 > netty-users mailing list
 > netty-users at lists.jboss.org
 > https://lists.jboss.org/mailman/listinfo/netty-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20111028/1b743928/attachment.html 


More information about the netty-users mailing list