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

Function connCreateAcceptedSocket

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

Create a new socket-type connection that is already associated with * an accepted connection. * * The socket is not ready for I/O until connAccept() was called and * invoked the connection-level accept handler. * * Callers should use connGetState() and verify the created connection * is not in an error state (which is not possible for a socket connection, * but could but possible with othe

Source from the content-addressed store, hash-verified

93 * but could but possible with other protocols).
94 */
95connection *connCreateAcceptedSocket(int fd) {
96 connection *conn = connCreateSocket();
97 conn->fd = fd;
98 conn->state = CONN_STATE_ACCEPTING;
99 return conn;
100}
101
102static int connSocketConnect(connection *conn, const char *addr, int port, const char *src_addr,
103 ConnectionCallbackFunc connect_handler) {

Callers 3

acceptTcpHandlerFunction · 0.85
acceptUnixHandlerFunction · 0.85
clusterAcceptHandlerFunction · 0.85

Calls 1

connCreateSocketFunction · 0.85

Tested by

no test coverage detected