20 #ifndef RIPPLE_OVERLAY_PROTOCOLVERSION_H_INCLUDED
21 #define RIPPLE_OVERLAY_PROTOCOLVERSION_H_INCLUDED
23 #include <boost/beast/core/string.hpp>
42 return {major, minor};
constexpr ProtocolVersion make_protocol(std::uint16_t major, std::uint16_t minor)
std::vector< ProtocolVersion > parseProtocolVersions(boost::beast::string_view const &value)
Parse a set of protocol versions.
std::pair< std::uint16_t, std::uint16_t > ProtocolVersion
Represents a particular version of the peer-to-peer protocol.
std::string const & supportedProtocolVersions()
The list of all the protocol versions we support.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool isProtocolSupported(ProtocolVersion const &v)
Determine whether we support a specific protocol version.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
std::optional< ProtocolVersion > negotiateProtocolVersion(std::vector< ProtocolVersion > const &versions)
Given a list of supported protocol versions, choose the one we prefer.