synchronous_socket_operations.qbk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. [/
  2. / Copyright (c) 2003-2019 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. [section:synchronous_socket_operations Requirements on synchronous socket operations]
  8. In this section, ['synchronous socket operations] are those member functions
  9. specified as two overloads, with and without an argument of type `error_code&`:
  10. ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN);
  11. ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN, error_code& ec);
  12. For an object `s`, the conditions under which its synchronous socket operations
  13. may block the calling thread (C++Std [defns.block]) are determined as follows.
  14. If:
  15. [mdash] `s.non_blocking() == true`,
  16. [mdash] the synchronous socket operation is specified in terms of a __POSIX__
  17. function other than `__poll__`,
  18. [mdash] that __POSIX__ function lists `EWOULDBLOCK` or `EAGAIN`
  19. in its failure conditions, and
  20. [mdash] the effects of the operation cannot be established immediately
  21. then the synchronous socket operation shall not block the calling thread.
  22. [inline_note And the effects of the operation are not established.]
  23. Otherwise, the synchronous socket operation shall block the calling thread
  24. until the effects are established.
  25. [endsect]