Read from the connection, behaves the same as read(2). * * Like read(2), a short read is possible. A return value of 0 will indicate the * connection was closed, and -1 will indicate an error. * * The caller should NOT rely on errno. Testing for an EAGAIN-like condition, use * connGetState() to see if the connection state is still CONN_STATE_CONNECTED. */
| 149 | * connGetState() to see if the connection state is still CONN_STATE_CONNECTED. |
| 150 | */ |
| 151 | static inline int connRead(connection *conn, void *buf, size_t buf_len) { |
| 152 | return conn->type->read(conn, buf, buf_len); |
| 153 | } |
| 154 | |
| 155 | /* Register a write handler, to be called when the connection is writable. |
| 156 | * If NULL, the existing handler is removed. |
no test coverage detected