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

Function rpc_conn_read_response

plugins/libplugin.c:942–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940}
941
942static 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
961static struct io_plan *rpc_conn_write_request(struct io_conn *conn,
962 struct plugin *plugin);

Callers 1

rpc_conn_initFunction · 0.85

Calls 2

rpc_read_response_oneFunction · 0.85
tal_bytelenFunction · 0.85

Tested by

no test coverage detected