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

Method create

include/process/address.hpp:209–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207{
208public:
209 static Try<Address> create(const std::string& path)
210 {
211 sockaddr_un un;
212
213 const size_t PATH_LENGTH = sizeof(un.sun_path);
214
215 if (path.length() >= PATH_LENGTH) {
216 return Error("Path too long, must be less than " +
217 stringify(PATH_LENGTH) + " bytes");
218 }
219
220 un.sun_family = AF_UNIX;
221 memcpy(un.sun_path, path.c_str(), path.length() + 1);
222
223 return Address(un);
224 }
225
226 Address(const sockaddr_un& un)
227 : sockaddr() // Zero initialize.

Callers

nothing calls this directly

Calls 1

AddressClass · 0.85

Tested by

no test coverage detected