| 113 | } |
| 114 | |
| 115 | struct 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 | |
| 133 | bool jsonrpc_sync_read(struct jsonrpc_io *json_in, int infd) |
| 134 | { |
nothing calls this directly
no outgoing calls
no test coverage detected