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

Function multiplex_peer_setup

connectd/multiplex.c:1666–1683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1664}
1665
1666struct io_plan *multiplex_peer_setup(struct io_conn *peer_conn,
1667 struct peer *peer)
1668{
1669 /*~ If conn closes, we drain the subd connections and wait for
1670 * lightningd to tell us to close with the peer */
1671 tal_add_destructor2(peer_conn, destroy_peer_conn, peer);
1672
1673 /* Start keepalives */
1674 peer->expecting_pong = PONG_UNEXPECTED;
1675 set_ping_timer(peer);
1676
1677 /* This used to be in openingd; don't break tests. */
1678 status_peer_debug(&peer->id, "Handed peer, entering loop");
1679
1680 return io_duplex(peer_conn,
1681 read_hdr_from_peer(peer_conn, peer),
1682 write_to_peer(peer_conn, peer));
1683}
1684
1685void peer_connect_subd(struct daemon *daemon, const u8 *msg, int fd)
1686{

Callers 1

peer_connectedFunction · 0.85

Calls 4

set_ping_timerFunction · 0.85
io_duplexFunction · 0.85
read_hdr_from_peerFunction · 0.85
write_to_peerFunction · 0.85

Tested by

no test coverage detected