MCPcopy Create free account
hub / github.com/actor-framework/actor-framework / probe

Function probe

libcaf_net/caf/net/socket.cpp:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124bool probe(socket x) {
125 auto err = 0;
126 auto len = static_cast<socklen_t>(sizeof(err));
127 auto err_ptr = reinterpret_cast<char*>(&err);
128 if (getsockopt(x.id, SOL_SOCKET, SO_ERROR, err_ptr, &len) == 0) {
129 WSASetLastError(err);
130 return err == 0;
131 } else {
132 return false;
133 }
134}
135
136error child_process_inherit(socket x, bool) {
137 // TODO: possible to implement via SetHandleInformation?

Callers 2

connect_with_timeoutFunction · 0.85
connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected