-
- Downloads
Fix repeated io tests using listen sockets
The tests may fail when repeated because the listener may bind to fast to the tcp tuple again. This is fixed by using SO_REUSEPORT instead of SO_REUSEADDR. TIL: SO_REUSEADDR is about address wildcards and SO_REUSEPORT allows binding to the same tcp tuple. https://stackoverflow.com/questions/14388706/how-do-so-reuseaddr-and-so-reuseport-differ Add a generic way to specify socket options when creating a listen socket with tcp_listener.
parent
94774ec7
No related branches found
No related tags found
Showing
- emper/io.hpp 14 additions, 1 deletionemper/io.hpp
- emper/io/io.cpp 19 additions, 9 deletionsemper/io/io.cpp
- tests/io/ConcurrentNetworkEchoTest.cpp 8 additions, 1 deletiontests/io/ConcurrentNetworkEchoTest.cpp
- tests/io/SimpleDiskAndNetworkTest.cpp 3 additions, 3 deletionstests/io/SimpleDiskAndNetworkTest.cpp
- tests/io/SimpleNetworkTest.cpp 9 additions, 1 deletiontests/io/SimpleNetworkTest.cpp
- tests/io/TimeoutTest.cpp 5 additions, 3 deletionstests/io/TimeoutTest.cpp
Loading
Please register or sign in to comment