The Transport converts one connection's sent messages to wire bytes, and received bytes back.
Synopsis
Declared in <net.h>
class Transport;
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 |
|
Destroy the transport. |
|
Get bytes to send on the wire, if any, along with other information about it. |
|
Retrieve information about this transport. |
|
Retrieve a completed message from transport. |
|
Return the memory usage of this transport attributable to buffered data to send. |
|
Report how many bytes returned by the last GetBytesToSend() have been sent. |
|
Feed wire bytes to the transport. |
|
Returns true if the current message is complete (so GetReceivedMessage can be called). |
|
Set the next message to send. |
|
Whether upon disconnections, a reconnect with V1 is warranted. |
Derived Classes
Name |
Description |
Transport implementation for the legacy (v1) unencrypted P2P protocol. |
|
Transport implementation for the encrypted BIP324 (v2) P2P protocol, with automatic fallback to v1 when the peer does not speak v2. |
Created with MrDocs