| 662 | } |
| 663 | |
| 664 | int Stream::SetHostSocket(Socket *host_socket) { |
| 665 | std::call_once(_set_host_socket_flag, [this, host_socket]() { |
| 666 | SocketUniquePtr ptr; |
| 667 | host_socket->ReAddress(&ptr); |
| 668 | // TODO add *this to host socke |
| 669 | if (ptr->AddStream(id()) != 0) { |
| 670 | CHECK(false) << id() << " fail to add stream to host socket"; |
| 671 | return; |
| 672 | } |
| 673 | _host_socket = ptr.release(); |
| 674 | }); |
| 675 | return 0; |
| 676 | } |
| 677 | |
| 678 | void Stream::FillSettings(StreamSettings *settings) { |
| 679 | settings->set_stream_id(id()); |
no test coverage detected