CS FundamentalsHardGATE CS · Product company CS fundamentals

A server restarts and its bind() to port 8080 fails with 'address already in use' because old connections are in TIME_WAIT. Which socket option is designed for this?

  1. A. SO_REUSEADDR
  2. B. TCP_NODELAY
  3. C. SO_KEEPALIVE
  4. D. SO_LINGER with a timeout of 120 s

Correct answer: A. SO_REUSEADDR

TIME_WAIT entries keep the 4-tuples of old connections; new connections use different client ports, so binding the listener again is safe. TCP_NODELAY disables Nagle, SO_KEEPALIVE probes idle peers, and SO_LINGER controls close behaviour.

More Computer Networks questions

Exams that ask this topic