[#HTTPRemoteClient-MaybeDisconnect]
= xref:HTTPRemoteClient.adoc[HTTPRemoteClient]::MaybeDisconnect
:relfileprefix: ../
:mrdocs:

Flag the client for disconnection if it is idle past the timeout or a global disconnect is requested&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
MaybeDisconnect(
    std::chrono::time&lowbar;point&lt;SteadyClock&gt; now,
    std::chrono::seconds rpcservertimeout,
    bool disconnect&lowbar;all);
----

== Return Value

true if the client was flagged for disconnection&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *now*
| The current time used to evaluate the idle timeout&period;
| *rpcservertimeout*
| Idle duration after which the client should be disconnected&period;
| *disconnect&lowbar;all*
| Whether all clients are being disconnected during shutdown&period;
|===


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