authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-10-26 21:31:38-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2019-10-26 21:31:38-04:00
log05003d533a8a4f4c49f7a251e26b5dfff5f278b3
tree5fdbbc01ba4c7430a94a9bec575ba6e260a3c2c4
parentfafd1fd4806e4f92b19bd5285cbe8d6748a90c54
parentd4e41c5bc616114beb44969585b47c1ec2a8c9ed
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #3537 from lun-4/fix/accept4

fix std.os.accept4

1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/os.zig+5-1
...@@ -1630,6 +1630,10 @@ pub const AcceptError = error{...@@ -1630,6 +1630,10 @@ pub const AcceptError = error{
16301630
1631 /// Firewall rules forbid connection.1631 /// Firewall rules forbid connection.
1632 BlockedByFirewall,1632 BlockedByFirewall,
1633
1634 /// This error occurs when no global event loop is configured,
1635 /// and accepting from the socket would block.
1636 WouldBlock,
1633} || UnexpectedError;1637} || UnexpectedError;
16341638
1635/// Accept a connection on a socket.1639/// Accept a connection on a socket.
...@@ -1650,7 +1654,7 @@ pub fn accept4(...@@ -1650,7 +1654,7 @@ pub fn accept4(
1650 ///1654 ///
1651 /// The returned address is truncated if the buffer provided is too small; in this case, `addr_size`1655 /// The returned address is truncated if the buffer provided is too small; in this case, `addr_size`
1652 /// will return a value greater than was supplied to the call.1656 /// will return a value greater than was supplied to the call.
1653 addr_size: *usize,1657 addr_size: *socklen_t,
1654 /// If flags is 0, then `accept4` is the same as `accept`. The following values can be bitwise1658 /// If flags is 0, then `accept4` is the same as `accept`. The following values can be bitwise
1655 /// ORed in flags to obtain different behavior:1659 /// ORed in flags to obtain different behavior:
1656 /// * `SOCK_NONBLOCK` - Set the `O_NONBLOCK` file status flag on the open file description (see `open`)1660 /// * `SOCK_NONBLOCK` - Set the `O_NONBLOCK` file status flag on the open file description (see `open`)