| ... | @@ -1630,6 +1630,10 @@ pub const AcceptError = error{ | ... | @@ -1630,6 +1630,10 @@ pub const AcceptError = error{ |
| 1630 | | 1630 | |
| 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; |
| 1634 | | 1638 | |
| 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 bitwise | 1658 | /// 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`) |