HTTPRemoteClient::MaybeDisconnect

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

Synopsis

Declared in <httpserver.h>

bool
MaybeDisconnect(
    std::chrono::time_point<SteadyClock> now,
    std::chrono::seconds rpcservertimeout,
    bool disconnect_all);

Return Value

true if the client was flagged for disconnection.

Parameters

NameDescription
nowThe current time used to evaluate the idle timeout.
rpcservertimeoutIdle duration after which the client should be disconnected.
disconnect_allWhether all clients are being disconnected during shutdown.