You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrew Schwartzmeyer <an...@schwartzmeyer.com> on 2018/02/01 23:30:12 UTC

Re: Review Request 65405: Implemented `net::socket()` for Windows using `WSASocket`.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65405/
-----------------------------------------------------------

(Updated Feb. 1, 2018, 3:30 p.m.)


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


Bugs: MESOS-5882
    https://issues.apache.org/jira/browse/MESOS-5882


Repository: mesos


Description
-------

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
default.

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.


Diffs (updated)
-----

  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 


Diff: https://reviews.apache.org/r/65405/diff/2/

Changes: https://reviews.apache.org/r/65405/diff/1-2/


Testing
-------


Thanks,

Andrew Schwartzmeyer


Re: Review Request 65405: Implemented `net::socket()` for Windows using `WSASocket`.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65405/#review196946
-----------------------------------------------------------


Ship it!




Ship It!

- Joseph Wu


On Feb. 1, 2018, 3:30 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65405/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2018, 3:30 p.m.)
> 
> 
> Review request for mesos, Akash Gupta, Jie Yu, and Joseph Wu.
> 
> 
> Bugs: MESOS-5882
>     https://issues.apache.org/jira/browse/MESOS-5882
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> 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
> default.
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   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 
> 
> 
> Diff: https://reviews.apache.org/r/65405/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 65405: Implemented `net::socket()` for Windows using `WSASocket`.

Posted by Akash Gupta <ak...@hotmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65405/#review197033
-----------------------------------------------------------


Ship it!




Ship It!

- Akash Gupta


On Feb. 1, 2018, 11:30 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65405/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2018, 11:30 p.m.)
> 
> 
> Review request for mesos, Akash Gupta, Jie Yu, and Joseph Wu.
> 
> 
> Bugs: MESOS-5882
>     https://issues.apache.org/jira/browse/MESOS-5882
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> 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
> default.
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   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 
> 
> 
> Diff: https://reviews.apache.org/r/65405/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 65405: Implemented `net::socket()` for Windows using `WSASocket`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65405/
-----------------------------------------------------------

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


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


Changes
-------

Re-arrange commits.


Bugs: MESOS-5882
    https://issues.apache.org/jira/browse/MESOS-5882


Repository: mesos


Description
-------

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
default.

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.


Diffs
-----

  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 


Diff: https://reviews.apache.org/r/65405/diff/2/


Testing
-------


Thanks,

Andrew Schwartzmeyer


Re: Review Request 65405: Implemented `net::socket()` for Windows using `WSASocket`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65405/
-----------------------------------------------------------

(Updated Feb. 8, 2018, 11:51 a.m.)


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


Bugs: MESOS-5882
    https://issues.apache.org/jira/browse/MESOS-5882


Repository: mesos


Description
-------

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
default.

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.


Diffs
-----

  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 


Diff: https://reviews.apache.org/r/65405/diff/2/


Testing
-------


Thanks,

Andrew Schwartzmeyer