[#CBanEntry-2constructor-0ee]
= xref:CBanEntry.adoc[CBanEntry]::CBanEntry
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

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

Construct an empty ban entry with default field values&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:CBanEntry/2constructor-01.adoc[CBanEntry]() = default;
----

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

Construct a ban entry with the given creation time&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:CBanEntry/2constructor-02.adoc[CBanEntry](int64&lowbar;t nCreateTimeIn);
----

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

Create a ban entry from JSON&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:CBanEntry/2constructor-0ea.adoc[CBanEntry](xref:UniValue.adoc[UniValue] const& json);
----

[.small]#xref:CBanEntry/2constructor-0ea.adoc[_» more&period;&period;&period;_]#

== Exceptions

[cols="1,4"]
|===
| Name| Thrown on
| `std&colon;&colon;runtime&lowbar;error`
| if the JSON does not have the expected fields&period;
|===

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nCreateTimeIn*
| Unix epoch time (seconds) when the ban was created&period;
| *json* [in]
| A JSON representation of a ban entry, as created by `ToJson()`&period;
|===


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