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

Function rioInitWithConn

app/redis-6.2.6/src/rio.c:255–263  ·  view source on GitHub ↗

Create an RIO that implements a buffered read from an fd * read_limit argument stops buffering when the reaching the limit. */

Source from the content-addressed store, hash-verified

253/* Create an RIO that implements a buffered read from an fd
254 * read_limit argument stops buffering when the reaching the limit. */
255void rioInitWithConn(rio *r, connection *conn, size_t read_limit) {
256 *r = rioConnIO;
257 r->io.conn.conn = conn;
258 r->io.conn.pos = 0;
259 r->io.conn.read_limit = read_limit;
260 r->io.conn.read_so_far = 0;
261 r->io.conn.buf = sdsnewlen(NULL, PROTO_IOBUF_LEN);
262 sdsclear(r->io.conn.buf);
263}
264
265/* Release the RIO stream. Optionally returns the unread buffered data
266 * when the SDS pointer 'remaining' is passed. */

Callers 1

readSyncBulkPayloadFunction · 0.85

Calls 2

sdsnewlenFunction · 0.85
sdsclearFunction · 0.85

Tested by

no test coverage detected