Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
The`tcp_stream`is designed as a replacement for用于替代 [@boost:/doc/html/boost_asio/reference/ip__tcp/socket.html `net::ip::tcp::socket`]. Any program which currently uses a socket, can switch to a `tcp_stream` and achieve the features above (although some interfaces are different, see below). Networking now allows I/O objects to construct with any instance of。任何当前使用套接字的程序都可以改用 `tcp_stream` 并获得上述功能(但部分接口存在差异,详见下文)。网络库现在允许 I/O 对象使用任意 __ExecutionContext__or或 __Executor__objects. Here we construct a stream which uses a particular I/O context to dispatch completion handlers:实例进行构造。以下示例构造一个流,该流使用特定的 I/O 上下文来调度完成处理器: