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

Method create

include/process/socket.hpp:268–277  ·  view source on GitHub ↗

* Returns an instance of a `Socket` using the specified kind of * implementation. * * @param s Optional. The file descriptor to wrap with the `Socket`. * @param kind Optional. The desired `Socket` implementation. * * @return An instance of a `Socket`. */

Source from the content-addressed store, hash-verified

266 * @return An instance of a `Socket`.
267 */
268 static Try<Socket> create(
269 int_fd s,
270 SocketImpl::Kind kind = SocketImpl::DEFAULT_KIND())
271 {
272 Try<std::shared_ptr<SocketImpl>> impl = SocketImpl::create(s, kind);
273 if (impl.isError()) {
274 return Error(impl.error());
275 }
276 return Socket(impl.get());
277 }
278
279 /**
280 * Returns an instance of a `Socket` using `AddressType` to determine

Callers

nothing calls this directly

Calls 2

SocketClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected