| 940 | } |
| 941 | |
| 942 | static struct io_plan *rpc_conn_read_response(struct io_conn *conn, |
| 943 | struct plugin *plugin) |
| 944 | { |
| 945 | plugin->rpc_used += plugin->rpc_len_read; |
| 946 | if (plugin->rpc_used == tal_count(plugin->rpc_buffer)) |
| 947 | tal_resize(&plugin->rpc_buffer, plugin->rpc_used * 2); |
| 948 | |
| 949 | /* Read and process all messages from the connection */ |
| 950 | while (rpc_read_response_one(plugin)) |
| 951 | ; |
| 952 | |
| 953 | /* Read more, if there is. */ |
| 954 | return io_read_partial(plugin->io_rpc_conn, |
| 955 | plugin->rpc_buffer + plugin->rpc_used, |
| 956 | tal_bytelen(plugin->rpc_buffer) - plugin->rpc_used, |
| 957 | &plugin->rpc_len_read, |
| 958 | rpc_conn_read_response, plugin); |
| 959 | } |
| 960 | |
| 961 | static struct io_plan *rpc_conn_write_request(struct io_conn *conn, |
| 962 | struct plugin *plugin); |
no test coverage detected