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

Function jcon_new_json_stream

lightningd/jsonrpc.c:112–124  ·  view source on GitHub ↗

The command itself usually owns the stream, because jcon may get closed. * The command transfers ownership once it's done though. */

Source from the content-addressed store, hash-verified

110/* The command itself usually owns the stream, because jcon may get closed.
111 * The command transfers ownership once it's done though. */
112static struct json_stream *jcon_new_json_stream(const tal_t *ctx,
113 struct json_connection *jcon,
114 struct command *writer)
115{
116 struct json_stream *js = new_json_stream(ctx, writer, jcon->log);
117
118 /* Wake writer to start streaming, in case it's not already. */
119 io_wake(jcon);
120
121 /* FIXME: Keep streams around for recycling. */
122 tal_arr_expand(&jcon->js_arr, js);
123 return js;
124}
125
126static void jcon_remove_json_stream(struct json_connection *jcon,
127 struct json_stream *js)

Callers 2

json_command_malformedFunction · 0.85
json_stream_raw_for_cmdFunction · 0.85

Calls 2

new_json_streamFunction · 0.85
io_wakeFunction · 0.85

Tested by

no test coverage detected