Skip to content

Add so_reuseaddr stream context option#19967

Closed
bukka wants to merge 1 commit intophp:masterfrom
bukka:stream_so_reuseaddr
Closed

Add so_reuseaddr stream context option#19967
bukka wants to merge 1 commit intophp:masterfrom
bukka:stream_so_reuseaddr

Conversation

@bukka
Copy link
Copy Markdown
Member

@bukka bukka commented Sep 25, 2025

This is to allow disabling of SO_REUSEADDR that is enabled by default.

The test actually took me quite long time to get it right. The crucial part is not to close $accepted which keeps client in FIN-WAIT-2.

This is to allow disabling of SO_REUSEADDR that is enabled by default.

To achieve better compatibility on Windows SO_EXCLUSIVEADDRUSE is set
if so_reuseaddr is false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant