sendmsgtopeer peer_id "msg_type" "msg"
Send a p2p message to a peer specified by id.
The message type and body must be provided, the message header will be generated.
This RPC is for testing only.
Arguments
1. peer_id (numeric, required) The peer to send the message to.
2. msg_type (string, required) The message type (maximum length 12)
3. msg (string, required) The serialized message body to send, in hex, without a message header
Result
{} (empty JSON object)
Examples
> bitcoin-cli sendmsgtopeer 0 "addr" "ffffff"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sendmsgtopeer", "params": [0 "addr" "ffffff"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/