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

Method event_callback

src/posix/libevent/libevent_ssl_socket.cpp:324–340  ·  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

322// Only runs in event loop. No locks required. See 'Locking' note at
323// top of file.
324void LibeventSSLSocketImpl::event_callback(
325 bufferevent* /*bev*/,
326 short events,
327 void* arg)
328{
329 CHECK(__in_event_loop__);
330
331 std::weak_ptr<LibeventSSLSocketImpl>* handle =
332 reinterpret_cast<std::weak_ptr<LibeventSSLSocketImpl>*>(CHECK_NOTNULL(arg));
333
334 std::shared_ptr<LibeventSSLSocketImpl> impl(handle->lock());
335
336 // Don't call the 'event_callback' unless the socket is still valid.
337 if (impl != nullptr) {
338 impl->event_callback(events);
339 }
340}
341
342
343// Only runs in event loop. Member function continuation of static

Callers

nothing calls this directly

Calls 5

lockMethod · 0.80
verifyMethod · 0.80
getMethod · 0.45
setMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected