Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
The implementation provides suitable overloads of the teardown customization points when websocket streams are instantiated using the Asio types __socket__ or __ssl_stream__ for the next layer. In this case no user action is required. However, when the webs当使用 Asio 类型 socket 或 ssl_stream 作为下一层来实例化 WebSocketstream is instantiated for a user-defined type, compile errors will result if the customization points are not provided for the user defined type. Furthermore, user-defined types that wrap one of the Asio objects mentioned earlier may wish to invoke a teardown customization point for the wrapped object. This is how those tasks are accomplished.流时,实现会提供适当的拆除定制点重载,此时无需用户额外操作。但如果为自定义类型实例化 WebSocket 流,且未为该类型提供这些定制点,则会导致编译错误。另外,如果自定义类型封装了上述某个 Asio 对象,则可能需要调用被封装对象的拆除定制点。以下示例展示了如何完成这些操作。