Skip to content

Only call reuse_address on Unix#432

Closed
alexcrichton wants to merge 1 commit intotokio-rs:masterfrom
alexcrichton:only-reuse-address-on-unix
Closed

Only call reuse_address on Unix#432
alexcrichton wants to merge 1 commit intotokio-rs:masterfrom
alexcrichton:only-reuse-address-on-unix

Conversation

@alexcrichton
Copy link
Contributor

The standard library only Does this on Unix, and otherwise it's a source of
divergent behavior on Windows.

Closes #400

The standard library only Does this on Unix, and otherwise it's a source of
divergent behavior on Windows.

Closes tokio-rs#400
@alexcrichton alexcrichton force-pushed the only-reuse-address-on-unix branch from 23ae8ea to 0c2a63e Compare July 19, 2016 07:03
@sateffen
Copy link

sateffen commented Jul 19, 2016

Just my optinion: But shouldn't mio behave the same on all oses, at least as much as possible?

I think mio shouldn't set reuse_address at all, but let the user set this, if he needs it. This way the behaviour on all platforms would be the same. Or is the resuse_address a default thing on unix systems?

@carllerche
Copy link
Member

Mio's defaults should result in portable code as much as possible. Aka, behavior that is as close as possible on all supported platforms. OS defaults diverge, so some different options will be required as defaults. If this is not the desired behavior, Mio allows the developer to configure the options as desired.

@carllerche
Copy link
Member

Thanks. Merged here 5d07d0b

@carllerche carllerche closed this Jul 19, 2016
@alexcrichton alexcrichton deleted the only-reuse-address-on-unix branch July 21, 2016 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants