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

Function connSocketWrite

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

Source from the content-addressed store, hash-verified

164}
165
166static int connSocketWrite(connection *conn, const void *data, size_t data_len) {
167 int ret = write(conn->fd, data, data_len);
168 if (ret < 0 && errno != EAGAIN) {
169 conn->last_errno = errno;
170
171 /* Don't overwrite the state of a connection that is not already
172 * connected, not to mess with handler callbacks.
173 */
174 if (conn->state == CONN_STATE_CONNECTED)
175 conn->state = CONN_STATE_ERROR;
176 }
177
178 return ret;
179}
180
181static int connSocketRead(connection *conn, void *buf, size_t buf_len) {
182 int ret = read(conn->fd, buf, buf_len);

Callers

nothing calls this directly

Calls 1

writeFunction · 0.70

Tested by

no test coverage detected