MCPcopy Create free account
hub / github.com/ElementsProject/elements / send_message

Method send_message

test/functional/test_framework/p2p.py:260–267  ·  view source on GitHub ↗

Send a P2P message over the socket. This method takes a P2P payload, builds the P2P header and adds the message to the send buffer to be sent over the socket.

(self, message)

Source from the content-addressed store, hash-verified

258 # Socket write methods
259
260 def send_message(self, message):
261 """Send a P2P message over the socket.
262
263 This method takes a P2P payload, builds the P2P header and adds
264 the message to the send buffer to be sent over the socket."""
265 tmsg = self.build_message(message)
266 self._log_message("send", message)
267 return self.send_raw_message(tmsg)
268
269 def send_raw_message(self, raw_message_bytes):
270 if not self.is_connected:

Callers 15

connection_madeMethod · 0.95
send_get_dataMethod · 0.45
send_get_headersMethod · 0.45
send_block_invMethod · 0.45
send_getblocksMethod · 0.45
test_null_locatorsMethod · 0.45
test_nonnull_locatorsMethod · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
on_pingMethod · 0.45
on_pingMethod · 0.45

Calls 3

build_messageMethod · 0.95
_log_messageMethod · 0.95
send_raw_messageMethod · 0.95

Tested by 15

test_null_locatorsMethod · 0.36
test_nonnull_locatorsMethod · 0.36
run_testMethod · 0.36
test_in_flight_maxMethod · 0.36
test_expiry_fallbackMethod · 0.36
test_preferred_invMethod · 0.36
test_txid_inv_delayMethod · 0.36
test_large_inv_batchMethod · 0.36