rippled
Loading...
Searching...
No Matches
peerfinder/Slot.h
1#pragma once
2
3#include <xrpl/beast/net/IPEndpoint.h>
4#include <xrpl/protocol/PublicKey.h>
5
6#include <optional>
7
8namespace xrpl {
9namespace PeerFinder {
10
12class Slot
13{
14public:
16
18
19 virtual ~Slot() = 0;
20
22 virtual bool
23 inbound() const = 0;
24
29 virtual bool
30 fixed() const = 0;
31
36 virtual bool
37 reserved() const = 0;
38
40 virtual State
41 state() const = 0;
42
44 virtual beast::IP::Endpoint const&
45 remote_endpoint() const = 0;
46
49 local_endpoint() const = 0;
50
52 listening_port() const = 0;
53
57 virtual std::optional<PublicKey> const&
58 public_key() const = 0;
59};
60
61} // namespace PeerFinder
62} // namespace xrpl
A version-independent IP address and port combination.
Definition IPEndpoint.h:18
Properties and state associated with a peer to peer overlay connection.
virtual std::optional< beast::IP::Endpoint > const & local_endpoint() const =0
The local endpoint of the socket, when known.
virtual bool reserved() const =0
Returns true if this is a reserved connection.
virtual std::optional< PublicKey > const & public_key() const =0
The peer's public key, when known.
virtual beast::IP::Endpoint const & remote_endpoint() const =0
The remote endpoint of socket.
virtual State state() const =0
Returns the state of the connection.
virtual bool inbound() const =0
Returns true if this is an inbound connection.
virtual bool fixed() const =0
Returns true if this is a fixed connection.
virtual std::optional< std::uint16_t > listening_port() const =0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5