M
markspace
Sahm's post reminded me about this:
Investigating Socket::isReachable() a while back, I discovered that the
Socket constructor actually establishes a TCP connection. This means
you can't set TCP parameters for the inital connection. For example,
SO_TIMEOUT.
Socket sock = new Socket( hostname, port );
sock.setSoTimeout( 6000 ); // too late!
There's no way that I can see to change the time out of the initial
connection, which occurs in the first line above, in the constructor.
You can set the time out for subsequent reads, but not the first connect.
Does anyone know of a way to control various TCP parameters, esp. the
time out, for the Socket constructor?
Investigating Socket::isReachable() a while back, I discovered that the
Socket constructor actually establishes a TCP connection. This means
you can't set TCP parameters for the inital connection. For example,
SO_TIMEOUT.
Socket sock = new Socket( hostname, port );
sock.setSoTimeout( 6000 ); // too late!
There's no way that I can see to change the time out of the initial
connection, which occurs in the first line above, in the constructor.
You can set the time out for subsequent reads, but not the first connect.
Does anyone know of a way to control various TCP parameters, esp. the
time out, for the Socket constructor?