• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/
2 / Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
3 /
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 /]
7
8[section:synchronous_socket_operations Requirements on synchronous socket operations]
9
10In this section, ['synchronous socket operations] are those member functions
11specified as two overloads, with and without an argument of type `error_code&`:
12
13  ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN);
14  ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN, error_code& ec);
15
16For an object `s`, the conditions under which its synchronous socket operations
17may block the calling thread (C++Std [defns.block]) are determined as follows.
18
19If:
20
21[mdash] `s.non_blocking() == true`,
22
23[mdash] the synchronous socket operation is specified in terms of a __POSIX__
24function other than `__poll__`,
25
26[mdash] that __POSIX__ function lists `EWOULDBLOCK` or `EAGAIN`
27in its failure conditions, and
28
29[mdash] the effects of the operation cannot be established immediately
30
31then the synchronous socket operation shall not block the calling thread.
32[inline_note And the effects of the operation are not established.]
33
34Otherwise, the synchronous socket operation shall block the calling thread
35until the effects are established.
36
37[endsect]
38