Skip to the content.

TCP Reuse Address

Introduction

The SO_REUSEADDR flag (or socket option) tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to expire.

When multiple processes with differing UIDs assign sockets to an identical UDP socket address with SO_REUSEADDR, incoming packets can become randomly distributed among the sockets. Thus, DONOT use SO_REUSEADDR on UDP.

Python Recipes

References