SO_REUSEADDR

S

Srubys

hiya

1.
a) I assume that if ServerSocket object is closed, local port and IP
can be reused immediately ( assuming there is no active or closing
connection to the same port) ?


b) And even if there is active connection to the same port, if new
ServerSocket object listens on same port, but different IP, then local
port can be reused immediately ( even without setting SO_REUSEADDR
option ) ?


c) If on a client side a connection is in timeout state, can you
immediately reuse this local port if new client socket listens on
different local IP ( even without setting the SO_REUSEADDR option )?


d) I gather that SO_REUSEADDR option enables new socket to bind to
same local port while there is still closing connection to that port,
but this new socket won’t be allowed to create connection with the
same socket pair?



2. If one server instance listens on port 2000 and on all local
interfaces, then no other server instance can listen on same port.
But if that server instance listens on just one local interface ( and
on port 2000 ), then there can be some other server instance listening
on same port and different local IP ?


thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top