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

Method recv_callback

src/posix/libevent/libevent_ssl_socket.cpp:223–236  ·  view source on GitHub ↗

Only runs in event loop. No locks required. See 'Locking' note at top of file.

Source from the content-addressed store, hash-verified

221// Only runs in event loop. No locks required. See 'Locking' note at
222// top of file.
223void LibeventSSLSocketImpl::recv_callback(bufferevent* /*bev*/, void* arg)
224{
225 CHECK(__in_event_loop__);
226
227 std::weak_ptr<LibeventSSLSocketImpl>* handle =
228 reinterpret_cast<std::weak_ptr<LibeventSSLSocketImpl>*>(CHECK_NOTNULL(arg));
229
230 std::shared_ptr<LibeventSSLSocketImpl> impl(handle->lock());
231
232 // Don't call the 'recv_callback' unless the socket is still valid.
233 if (impl != nullptr) {
234 impl->recv_callback();
235 }
236}
237
238
239// Only runs in event loop. Member function continuation of static

Callers 1

recvMethod · 0.95

Calls 3

lockMethod · 0.80
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected