-
Notifications
You must be signed in to change notification settings - Fork 23
QuantumGate::Local::DisconnectFrom
Karel Donk edited this page Jun 10, 2018
·
8 revisions
Initiates disconnection from a peer on the network. The optional DisconnectCallback
function gets called upon completion. If a DisconnectCallback
was supplied when the connection was made through the QuantumGate::Local::ConnectTo
function, that one gets replaced.
Result<> DisconnectFrom(const PeerLUID pluid,
DisconnectCallback&& function = nullptr) noexcept;
Name | Description |
---|---|
pluid |
A QuantumGate::PeerLUID with the Locally Unique Identifier of the connected peer. |
disconnect_func |
A QuantumGate::DisconnectCallback object containing the function to call when the connection closes. Defaults to nullptr . See QuantumGate Callbacks for more details. |
Returns a QuantumGate::Result
object equal to one of the following QuantumGate::ResultCode
s:
Value | Description |
---|---|
QuantumGate::ResultCode::Succeeded |
The operation succeeded. |
QuantumGate::ResultCode::Failed |
The operation failed. |
QuantumGate::ResultCode::PeerNotFound |
The operation failed because the peer wasn't found. |
QuantumGate::ResultCode::NotRunning |
The operation failed because the instance isn't running. |