[#V1Transport]
= V1Transport
:mrdocs:

Transport implementation for the legacy (v1) unencrypted P2P protocol&period;

== Synopsis

Declared in `&lt;net&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class V1Transport final
    : public xref:Transport.adoc[Transport]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:Transport.adoc[Transport]`
| The Transport converts one connection&apos;s sent messages to wire bytes, and received bytes back&period;
|===

== Types

[cols="1,4"]
|===
| Name| Description
| xref:Transport/Info.adoc[`Info`] 
| Summary information about a transport, exposed for stats&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:Transport/BytesToSend.adoc[`BytesToSend`] 
| Return type for GetBytesToSend, consisting of&colon; &hyphen; std&colon;&colon;span&lt;const uint8&lowbar;t&gt; to&lowbar;send&colon; span of bytes to be sent over the wire (possibly empty)&period; &hyphen; bool more&colon; whether there will be more bytes to be sent after the ones in to&lowbar;send are all sent (as signaled by MarkBytesSent())&period; &hyphen; const std&colon;&colon;string&amp; m&lowbar;type&colon; message type on behalf of which this is being sent (&quot;&quot; for bytes that are not on behalf of any message)&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:V1Transport/2constructor.adoc[`V1Transport`]         [.small]#[constructor]#
| Construct a v1 transport for the given node id (used only for logging)&period;
| xref:V1Transport/GetBytesToSend.adoc[`GetBytesToSend`]  [.small]#[virtual]#
| Return the bytes currently pending to be sent on the wire&period;
| xref:V1Transport/GetInfo.adoc[`GetInfo`]  [.small]#[virtual]#
| Return the transport info (protocol type&semi; v1 has no session id)&period;
| xref:V1Transport/GetReceivedMessage.adoc[`GetReceivedMessage`]  [.small]#[virtual]#
| Retrieve a completed received message, stamping it with the given time&period;
| xref:V1Transport/GetSendMemoryUsage.adoc[`GetSendMemoryUsage`]  [.small]#[virtual]#
| Return the memory used by buffered send data&period;
| xref:V1Transport/MarkBytesSent.adoc[`MarkBytesSent`]  [.small]#[virtual]#
| Report how many pending bytes were actually sent&period;
| xref:V1Transport/ReceivedBytes.adoc[`ReceivedBytes`]  [.small]#[virtual]#
| Feed received wire bytes to the transport, consuming them from the front&period;
| xref:V1Transport/ReceivedMessageComplete.adoc[`ReceivedMessageComplete`]  [.small]#[virtual]#
| Return whether a full message has been received and can be retrieved&period;
| xref:V1Transport/SetMessageToSend.adoc[`SetMessageToSend`]  [.small]#[virtual]#
| Set the next message to send, returning whether it was accepted&period;
| xref:V1Transport/ShouldReconnectV1.adoc[`ShouldReconnectV1`]  [.small]#[virtual]#
| Whether a v1 reconnect is warranted&semi; always false for a v1 transport&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
