1 #include "hmbdc/Copyright.hpp" 4 #include "hmbdc/comm/inet/Endpoint.hpp" 5 #include "hmbdc/app/Message.hpp" 6 #include "hmbdc/Endian.hpp" 13 #include <arpa/inet.h> 15 namespace hmbdc {
namespace tips {
namespace tcpcast {
21 void const* payload()
const {
22 return reinterpret_cast<const char*
>(
this)
27 return reinterpret_cast<char*
>(
this)
31 uint16_t typeTag()
const {
36 template <
typename Message>
42 template <
typename Message>
43 Message
const& wrapped()
const {
48 size_t wireSize()
const {
52 size_t wireSizeContainsTRansportHeader()
const {
55 } __attribute__((packed));
70 , loopback(loopbackIn) {
71 snprintf(ip,
sizeof(ip),
"%s", ipIn.c_str());
80 bool addTypeTag(uint16_t tag) {
81 auto c = uint16_t{typeTagCountContained};
84 typeTagCountContained = c;
91 std::ostream& operator << (std::ostream& os,
TypeTagSource const& m) {
92 os <<
"TypeTagSource:" << m.ip <<
':' << m.port;
93 for (
auto i = 0u; i < m.typeTagCountContained; i++) {
94 os <<
' ' << m.typeTags[i];
99 } __attribute__((packed));
110 std::ostream& operator << (std::ostream& os,
SessionStarted const & m) {
111 return os <<
"Session to TypeTag source started " << m.ip;
124 std::ostream& operator << (std::ostream& os,
SessionDropped const & m) {
125 return os <<
"Session to source dropped " << m.ip;
each message type has 16 bit tag
Definition: Message.hpp:62
this message tipsears in the receiver's buffer indicating a previously connected source is dropped ...
Definition: Messages.hpp:120
Definition: Message.hpp:212
Definition: Message.hpp:263
this message tipsears in the receiver's buffer indicating a new source is connected ...
Definition: Messages.hpp:106