![]() |
Home | Libraries | People | FAQ | More |
A socket 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 service class for protocol Protocol, a
denotes a value of type X,
b denotes a value of type
X::implementation_type, p
denotes a value of type Protocol,
n denotes a value of type
X::native_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,
h denotes a value of type
socket_base::shutdown_type, ch
denotes a value meeting ConnectHandler requirements, and
u and v
denote identifiers.
Table 18. SocketService requirements
|
expression |
return type |
assertion/note |
|---|---|---|
|
|
|
The implementation-defined native representation of a socket. Must
satisfy the requirements of |
|
|
|
From IoObjectService
requirements. |
|
|
|
From IoObjectService
requirements. Implicitly cancels asynchronous operations, as if by
calling |
|
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(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: |
|
a.at_mark(b, ec);
|
|
pre: |
|
const X& u = a; const X::implementation_type& v = b; u.at_mark(v, ec);
|
|
pre: |
|
a.available(b, ec);
|
|
pre: |
|
const X& u = a; const X::implementation_type& v = b; u.available(v, ec);
|
|
pre: |
|
const typename Protocol::endpoint& u = e; a.bind(b, u, ec);
|
|
pre: |
|
a.shutdown(b, h, 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.remote_endpoint(b, ec);
|
|
pre: |
|
const X& u = a; const X::implementation_type& v = b; u.remote_endpoint(v, ec);
|
|
pre: |
|
const typename Protocol::endpoint& u = e; a.connect(b, u, ec);
|
|
pre: |
|
const typename Protocol::endpoint& u = e; a.async_connect(b, u, ch);
|
|
pre: |