14#include <boost/asio/ip/address.hpp>
15#include <boost/asio/ip/tcp.hpp>
16#include <boost/asio/ip/udp.hpp>
42 boost::asio::ip::address_v4::bytes_type
v4;
43 boost::asio::ip::address_v6::bytes_type
v6;
51 "Size shouldn't be more than"
67 std::is_same<P, boost::asio::ip::tcp>::value ||
68 std::is_same<P, boost::asio::ip::udp>::value,
"Invalid protocol.");
69 return std::is_same<P, boost::asio::ip::tcp>::value ?
83 template <
typename Protocol>
93 template <
typename Protocol>
112 operator Token()
const;
128 void set_address(
const boost::asio::ip::address &addr);
158 template <
typename Protocol>
164 return get_endpoint<boost::asio::ip::udp>();
168 return get_endpoint<boost::asio::ip::tcp>();
#define DEBUG_ASSERT(predicate)
A token that uniquely identify a stream.
std::array< unsigned char, 24u > data
Keeps the mapping between streams and sessions.
Serializes a stream endpoint.
boost::asio::ip::tcp::endpoint to_tcp_endpoint() const
boost::asio::ip::address get_address() const
bool address_is_v6() const
const auto & get_stream_id() const
static constexpr auto get_protocol()
boost::asio::ip::basic_endpoint< P > get_endpoint() const
token_type(stream_id_type stream_id, EndPoint< Protocol, PartiallyDefinedEndPoint > ep)
bool has_same_protocol(const boost::asio::ip::basic_endpoint< Protocol > &) const
boost::asio::ip::udp::endpoint to_udp_endpoint() const
void set_address(const boost::asio::ip::address &addr)
bool protocol_is_tcp() const
token_type(stream_id_type stream_id, const EndPoint< Protocol, FullyDefinedEndPoint > &ep)
bool protocol_is_udp() const
bool address_is_v4() const
token_type(token_data data)
token_type(const token_type &)=default
void set_stream_id(stream_id_type id)
This file contains definitions of common data structures used in traffic manager.
enum carla::streaming::detail::token_data::address address_type
boost::asio::ip::address_v4::bytes_type v4
boost::asio::ip::address_v6::bytes_type v6