Assign an existing native socket to the socket. * This function opens the socket to hold an existing native socket. * * @param protocol An object specifying which protocol is to be used. * * @param native_socket A native socket. * * @throws asio::system_error Thrown on failure. */
| 456 | * @throws asio::system_error Thrown on failure. |
| 457 | */ |
| 458 | void assign(const protocol_type& protocol, |
| 459 | const native_handle_type& native_socket) |
| 460 | { |
| 461 | asio::error_code ec; |
| 462 | impl_.get_service().assign(impl_.get_implementation(), |
| 463 | protocol, native_socket, ec); |
| 464 | asio::detail::throw_error(ec, "assign"); |
| 465 | } |
| 466 | |
| 467 | /// Assign an existing native socket to the socket. |
| 468 | /* |
no test coverage detected