MCPcopy Create free account
hub / github.com/axboe/liburing / should_shutdown

Function should_shutdown

examples/proxy.c:849–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

847}
848
849static bool should_shutdown(struct conn *c)
850{
851 int i;
852
853 if (!pending_shutdown(c))
854 return false;
855 if (is_sink)
856 return true;
857 if (!bidi)
858 return c->cd[0].in_bytes == c->cd[1].out_bytes;
859
860 for (i = 0; i < 2; i++) {
861 if (c->cd[0].rcv != c->cd[1].snd)
862 return false;
863 if (c->cd[1].rcv != c->cd[0].snd)
864 return false;
865 }
866
867 return true;
868}
869
870/*
871 * Close this connection - send a ring message to the connection with intent

Callers 1

house_keepingFunction · 0.85

Calls 1

pending_shutdownFunction · 0.85

Tested by

no test coverage detected