-
Notifications
You must be signed in to change notification settings - Fork 23
QuantumGate::Peer::GetSuspended
Checks whether or not the connection to the peer is (still) in the suspended state.
Certain connections to peers (such as when using the UDP protocol or relayed connections where the UDP protocol is used on one or more hops) can enter a suspended state when the peer becomes unresponsive. This can happen when, for example, the peer (temporarily) loses access to the Internet or switches networks (for example disconnecting from one WIFI network and connecting to another one). As soon as the local QuantumGate instance hears back from the peer the connection is put back in the active state.
If the local QuantumGate instance does not hear from the peer within a specified interval (depending on the security settings), the suspended connection eventually times out and the peer is disconnected.
Result<bool> GetSuspended() const noexcept;
Returns a QuantumGate::Result
containing, upon successful completion, a bool
value indicating whether the peer is suspended (true
) or not (false
).
The QuantumGate::Result
object will equal one of the following QuantumGate::ResultCode
s:
Value | Description |
---|---|
QuantumGate::ResultCode::Succeeded |
The operation succeeded. |
QuantumGate::ResultCode::PeerNotReady |
The operation failed because the peer wasn't ready. The connection to the peer may still be in the process of being established or may have been disconnected. |