[#V2Transport-2constructor-07]
= xref:V2Transport.adoc[V2Transport]::V2Transport
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

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

Construct a V2 transport with securely generated random keys&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:V2Transport/2constructor-04.adoc[V2Transport](
    xref:NodeId-08.adoc[NodeId] nodeid,
    bool initiating) noexcept;
----

[.small]#xref:V2Transport/2constructor-04.adoc[_» more&period;&period;&period;_]#

Construct a V2 transport with specified keys and garbage (test use only)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:V2Transport/2constructor-02.adoc[V2Transport](
    xref:NodeId-08.adoc[NodeId] nodeid,
    bool initiating,
    xref:CKey.adoc[CKey] const& key,
    std::span&lt;std::byte const&gt; ent32,
    std::vector&lt;uint8&lowbar;t&gt; garbage) noexcept;
----

[.small]#xref:V2Transport/2constructor-02.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nodeid* [in]
| the node&apos;s NodeId (only for debug log output)&period;
| *initiating* [in]
| whether we are the initiator side&period;
| *key* [in]
| the private key to use for this transport&period;
| *ent32* [in]
| 32 bytes of entropy used to derive the session&period;
| *garbage* [in]
| garbage bytes to send before the garbage terminator&period;
|===


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