A socket acceptor service must meet the requirements for an I/O object service, as well as the additional requirements listed below.
In the table below, X
denotes
a socket acceptor service class for protocol Protocol
, a
and ao
denote values of type
X
, b
and c
denote values of type
X::implementation_type
, p
denotes a value of type Protocol
,
n
denotes a value of type
X::native_handle_type
, e
denotes a value of type Protocol::endpoint
,
ec
denotes a value of type
error_code
, s
denotes a value meeting SettableSocketOption
requirements,
g
denotes a value meeting
GettableSocketOption
requirements, i
denotes a
value meeting IoControlCommand
requirements,
k
denotes a value of type
basic_socket<Protocol, SocketService>
where SocketService
is a
type meeting socket service
requirements, ah
denotes
a value meeting AcceptHandler
requirements, and
u
and v
denote identifiers.
Table 31. SocketAcceptorService requirements
expression |
return type |
assertion/note |
---|---|---|
|
The implementation-defined native representation of a socket acceptor.
Must satisfy the requirements of |
|
|
From IoObjectService
requirements. |
|
|
From IoObjectService
requirements. Implicitly cancels asynchronous operations, as if
by calling |
|
a.move_construct(b, c);
|
From IoObjectService
requirements. The underlying native representation is moved from
|
|
a.move_assign(b, ao, c);
|
From IoObjectService
requirements. Implicitly cancels asynchronous operations associated
with |
|
a.open(b, p, ec);
|
|
pre: |
a.assign(b, p, n, ec);
|
|
pre: |
a.is_open(b);
|
|
|
const X& u = a; const X::implementation_type& v = b; u.is_open(v);
|
|
|
a.close(b, ec);
|
|
If |
a.native_handle(b);
|
|
|
a.cancel(b, ec);
|
|
pre: |
a.set_option(b, s, ec);
|
|
pre: |
a.get_option(b, g, ec);
|
|
pre: |
const X& u = a; const X::implementation_type& v = b; u.get_option(v, g, ec);
|
|
pre: |
a.io_control(b, i, ec);
|
|
pre: |
const typename Protocol::endpoint& u = e; a.bind(b, u, ec);
|
|
pre: |
a.local_endpoint(b, ec);
|
|
pre: |
const X& u = a; const X::implementation_type& v = b; u.local_endpoint(v, ec);
|
|
pre: |
a.accept(b, k, &e, ec);
|
|
pre: |
a.accept(b, k, 0, ec);
|
|
pre: |
a.async_accept(b, k, &e, ah);
|
pre: |
|
a.async_accept(b, k, 0, ah);
|
pre: |