MCPcopy Create free account
hub / github.com/apache/brpc / SetHostSocket

Method SetHostSocket

src/brpc/stream.cpp:664–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664int 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
678void Stream::FillSettings(StreamSettings *settings) {
679 settings->set_stream_id(id());

Callers 2

Calls 4

idFunction · 0.85
ReAddressMethod · 0.80
AddStreamMethod · 0.80
releaseMethod · 0.45

Tested by

no test coverage detected