MCPcopy Create free account
hub / github.com/apache/mesos / create

Method create

3rdparty/libprocess/include/process/socket.hpp:274–283  ·  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

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

Callers

nothing calls this directly

Calls 6

SocketClass · 0.85
errorMethod · 0.65
createFunction · 0.50
ErrorClass · 0.50
isErrorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected