MCPcopy Create free account
hub / github.com/apple/foundationdb / bind

Method bind

flow/Net2.actor.cpp:683–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681 }
682
683 void bind(NetworkAddress const& addr) override {
684 boost::system::error_code ec;
685 socket.bind(udpEndpoint(addr), ec);
686 if (ec) {
687 Error x;
688 if (ec.value() == EADDRINUSE)
689 x = address_in_use();
690 else if (ec.value() == EADDRNOTAVAIL)
691 x = invalid_local_address();
692 else
693 x = bind_failed();
694 TraceEvent(SevWarnAlways, "Net2UDPBindError").error(x);
695 throw x;
696 }
697 isPublic = true;
698 }
699
700 UID getDebugID() const override { return id; }
701

Callers 7

mainFunction · 0.45
to_aMethod · 0.45
jquery.treeview.jsFile · 0.45
_get_free_port_internalFunction · 0.45
getOrValidateAddressFunction · 0.45
get_free_portMethod · 0.45

Calls 4

udpEndpointFunction · 0.85
TraceEventClass · 0.85
valueMethod · 0.45
errorMethod · 0.45

Tested by 1

get_free_portMethod · 0.36