MCPcopy Create free account
hub / github.com/ElementsProject/lightning / jsonrpc_io_read_

Function jsonrpc_io_read_

common/jsonrpc_io.c:115–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115struct io_plan *jsonrpc_io_read_(struct io_conn *conn,
116 struct jsonrpc_io *json_in,
117 struct io_plan *(*next)(struct io_conn *,
118 void *),
119 void *arg)
120{
121 /* Make sure there's more room */
122 membuf_prepare_space(&json_in->membuf, READ_CHUNKSIZE);
123
124 /* Try to read more. */
125 json_in->bytes_read = 0;
126 return io_read_partial(conn,
127 membuf_space(&json_in->membuf),
128 membuf_num_space(&json_in->membuf),
129 &json_in->bytes_read,
130 next, arg);
131}
132
133bool jsonrpc_sync_read(struct jsonrpc_io *json_in, int infd)
134{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected