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