MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / sendReplyToClient

Function sendReplyToClient

src/networking.cpp:1968–1981  ·  view source on GitHub ↗

Write event handler. Just send data to the client. */

Source from the content-addressed store, hash-verified

1966
1967/* Write event handler. Just send data to the client. */
1968void sendReplyToClient(connection *conn) {
1969 client *c = (client*)connGetPrivateData(conn);
1970 if (writeToClient(c,1) == C_ERR)
1971 {
1972 AeLocker ae;
1973 c->lock.lock();
1974 ae.arm(c);
1975 if (c->flags & CLIENT_CLOSE_ASAP)
1976 {
1977 if (!freeClient(c))
1978 c->lock.unlock();
1979 }
1980 }
1981}
1982
1983void ProcessPendingAsyncWrites()
1984{

Callers

nothing calls this directly

Calls 6

connGetPrivateDataFunction · 0.85
writeToClientFunction · 0.85
armMethod · 0.80
freeClientFunction · 0.70
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected