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

Method recv

tests/test_opening.py:3720–3727  ·  view source on GitHub ↗
(self, maxlen)

Source from the content-addressed store, hash-verified

3718 self.sock.sendall(data)
3719
3720 def recv(self, maxlen):
3721 while len(self.buf) < maxlen:
3722 chunk = self.sock.recv(maxlen - len(self.buf))
3723 if not chunk:
3724 raise ConnectionError("peer closed connection")
3725 self.buf += chunk
3726 ret, self.buf = self.buf[:maxlen], self.buf[maxlen:]
3727 return ret
3728
3729 # dualopend doesn't listen for the disconnect, so connectd has to force it.
3730 l1 = node_factory.get_node(broken_log='Subd did not close, forcing close')

Callers 5

test_tracing_socketFunction · 0.45
joinMethod · 0.45
start_writerFunction · 0.45
htlc_accepted_handlerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected