Transport implementation for the encrypted BIP324 (v2) P2P protocol, with automatic fallback to v1 when the peer does not speak v2.
Synopsis
Declared in <net.h>
class V2Transport final
: public Transport
Base Classes
Name |
Description |
The Transport converts one connection's sent messages to wire bytes, and received bytes back. |
Types
Name |
Description |
Summary information about a transport, exposed for stats. |
Type Aliases
Name |
Description |
Return type for GetBytesToSend, consisting of: ‐ std::span<const uint8_t> to_send: span of bytes to be sent over the wire (possibly empty). ‐ bool more: whether there will be more bytes to be sent after the ones in to_send are all sent (as signaled by MarkBytesSent()). ‐ const std::string& m_type: message type on behalf of which this is being sent ("" for bytes that are not on behalf of any message). |
Member Functions
Name |
Description |
|
Constructors |
|
Return the bytes currently pending to be sent on the wire. |
|
Return the transport info, including the BIP324 session id. |
|
Retrieve a completed received message, stamping it with the given time. |
|
Return the memory used by buffered send data. |
|
Report how many pending bytes were actually sent. |
|
Feed received wire bytes to the transport, consuming them from the front. |
|
Return whether a full message has been received and can be retrieved. |
|
Set the next message to send, returning whether it was accepted. |
|
Whether a v1 reconnect is warranted after this v2 connection failed. |
Static Data Members
Name |
Description |
Maximum length of the garbage bytes sent before the garbage terminator. |
Created with MrDocs