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

Function connCreateAcceptedSocket

src/connection.cpp:96–101  ·  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

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

Callers 3

clusterAcceptHandlerFunction · 0.85
acceptTcpHandlerFunction · 0.85
acceptUnixHandlerFunction · 0.85

Calls 1

connCreateSocketFunction · 0.85

Tested by

no test coverage detected