This allows us to get back to single binary tests where appropriate, which will help in-depth profiling efforts.
I've built this atop my smoke_test changes as they inspired me to get this done.
A previous fix to make close() occur later can cause socket reuse by servers to fail as previous sockets are left asynchronously open.
This change:
- adds a callback to TCP server shutdown to signal that the server is completely shutdown
- wait for that callback before destroying listeners in the server (and before destroying the server)
- handles fallout
It was awkward for the generated code to call an API that offered
both insecure_server and secure_server as well as insecure_stub and
secure_stub. With this change there is just a single server function
and a single stub function and security is decided based on arguments
passed.
-) using dupenv_s instead of getenv_s and calling strdup ourselves.
-) few impossible-to-obtain if checks.
-) various signed/unsigned casting.
-) using time_t instead of time32_t
-) checking output of FormatMessage for failures.
-) don't redefine _WIN32_WINNT without undefining it first.
-) fixed msvc's interlocked casting.
-) renamed AddPort to AddListeningPort.
-) added protobuf's third_party includes to search path.
-) added a missing definition for inet_ntop in mingw32.
-) removed useless declarations.