Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPassiveSocket::Listen() behaves different on Windows #18

Open
hayguen opened this issue Aug 12, 2020 · 0 comments
Open

CPassiveSocket::Listen() behaves different on Windows #18

hayguen opened this issue Aug 12, 2020 · 0 comments

Comments

@hayguen
Copy link
Contributor

hayguen commented Aug 12, 2020

On Windows,

    SETSOCKOPT(m_socket, SOL_SOCKET, SO_REUSEADDR, (char*)&nReuse, sizeof(int32));
    SETSOCKOPT(m_socket, IPPROTO_TCP, IP_TOS, &nReuse, sizeof(int32));

is NOT executed, where especially setting SO_REUSEADDR leads to different behaviour,
when closing listening socket .. and trying to listen again within a few seconds.

same behaviour could be achieved, when always calling
CSimpleSocket::SetOptionReuseAddr()

always inside Listen() - as alternative, have it called from outside before calling Listen() - if desired.

The same issue also for IPPROTO_TCP / IP_TOS but this function is missing in CSimpleSocket - for now.

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

No branches or pull requests

1 participant