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

Function multiplex_peer_setup

connectd/multiplex.c:1779–1796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1777}
1778
1779struct io_plan *multiplex_peer_setup(struct io_conn *peer_conn,
1780 struct peer *peer)
1781{
1782 /*~ If conn closes, we drain the subd connections and wait for
1783 * lightningd to tell us to close with the peer */
1784 tal_add_destructor2(peer_conn, destroy_peer_conn, peer);
1785
1786 /* Start keepalives */
1787 peer->expecting_pong = PONG_UNEXPECTED;
1788 set_ping_timer(peer);
1789
1790 /* This used to be in openingd; don't break tests. */
1791 status_peer_debug(&peer->id, "Handed peer, entering loop");
1792
1793 return io_duplex(peer_conn,
1794 read_hdr_from_peer(peer_conn, peer),
1795 write_to_peer(peer_conn, peer));
1796}
1797
1798void peer_connect_subd(struct daemon *daemon, const u8 *msg, int fd)
1799{

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