Skip to content

QuantumGate::Access::Manager::AddPeer

Karel Donk edited this page Dec 11, 2019 · 1 revision

Adds access settings for a peer to the instance. Peer access settings are used to identify and authenticate a peer based on their UUID and matching public key. You can also configure which peers are allowed or blocked on the local instance.

Signature

Result<> AddPeer(PeerAccessSettings&& pas) noexcept;

Parameters

Name Description
pas The access settings for the peer. See QuantumGate::Access::PeerAccessSettings for more details.

Return values

Returns a QuantumGate::Result object equal to one of the following QuantumGate::ResultCodes:

Value Description
QuantumGate::ResultCode::Succeeded The operation succeeded.
QuantumGate::ResultCode::Failed The operation failed.
QuantumGate::ResultCode::InvalidArgument The operation failed because an invalid argument was passed through. The UUID and the public key may not belong together.
QuantumGate::ResultCode::PeerAlreadyExists The operation failed because the peer already exists.
Clone this wiki locally