MCPcopy Create free account
hub / github.com/3rdparty/libprocess / connect

Function connect

include/process/network.hpp:60–70  ·  view source on GitHub ↗

TODO(benh): Remove and defer to Socket::connect.

Source from the content-addressed store, hash-verified

58
59// TODO(benh): Remove and defer to Socket::connect.
60inline Try<Nothing, SocketError> connect(int_fd s, const Address& address)
61{
62 sockaddr_storage storage = address;
63
64 const socklen_t address_size = static_cast<socklen_t>(address.size());
65 if (net::connect(s, (sockaddr*) &storage, address_size) < 0) {
66 return SocketError("Failed to connect to " + stringify(address));
67 }
68
69 return Nothing();
70}
71
72
73/**

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected