mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <>
Subject Re: Review Request 65405: Implemented `net::socket()` for Windows using `WSASocket`.
Date Thu, 08 Feb 2018 22:36:20 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Feb. 8, 2018, 2:36 p.m.)

Review request for mesos, Akash Gupta, Jie Yu, and Joseph Wu.


Re-arrange commits.

Bugs: MESOS-5882

Repository: mesos


Rather than reusing the existing `net::socket()` wrapper for Windows,
the original wrapper was moved to `posix/socket.hpp`, and a new wrapper
was written in `windows/socket.hpp` which uses `::WSASocket()` instead
of `::socket()` and takes an optional set of Windows socket flags.

We enable `WSA_FLAG_OVERLAPPED` so that the socket supports overlapped
I/O operations (the default behavior of `::socket()`; MSDN states that
most sockets should be created with this flag set, so it is a reasonable

Furthermore, we enable `WSA_FLAG_NO_HANDLE_INHERIT`, which provides the
semantics of close-on-exec. This is set by default because (a) it is not
possible to change afterwards, and (b) we never use inheritable sockets.
Therefore it reasonable to also disable inheritance.


  3rdparty/stout/include/stout/os/posix/socket.hpp bab0b808f53abd1314a7d13fc0cba75e5717f96f

  3rdparty/stout/include/stout/os/socket.hpp 2ca4465ca23c9ca59239947c9babf8dd0212fafd 
  3rdparty/stout/include/stout/os/windows/socket.hpp 020c5e2367217cd2b4439ae5e2d5be4b31b4226b




Andrew Schwartzmeyer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message