MCPcopy Create free account
hub / github.com/F-Stack/f-stack / connSocketAccept

Function connSocketAccept

app/redis-6.2.6/src/connection.c:198–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198static int connSocketAccept(connection *conn, ConnectionCallbackFunc accept_handler) {
199 int ret = C_OK;
200
201 if (conn->state != CONN_STATE_ACCEPTING) return C_ERR;
202 conn->state = CONN_STATE_CONNECTED;
203
204 connIncrRefs(conn);
205 if (!callHandler(conn, accept_handler)) ret = C_ERR;
206 connDecrRefs(conn);
207
208 return ret;
209}
210
211/* Register a write handler, to be called when the connection is writable.
212 * If NULL, the existing handler is removed.

Callers

nothing calls this directly

Calls 3

connIncrRefsFunction · 0.85
callHandlerFunction · 0.85
connDecrRefsFunction · 0.85

Tested by

no test coverage detected