MCPcopy Create free account
hub / github.com/acl-dev/acl / handle_message

Function handle_message

lib_acl_cpp/samples/mqtt/mqtt_client/main.cpp:122–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static bool handle_message(acl::mqtt_client& conn, acl::mqtt_message& message) {
123 acl::mqtt_type_t type = message.get_header().get_type();
124 switch (type) {
125 case acl::MQTT_CONNACK:
126 return handle_connack(conn, message);
127 case acl::MQTT_PINGREQ:
128 return handle_pingreq(conn);
129 case acl::MQTT_PINGRESP:
130 return handle_pingresp();
131 case acl::MQTT_DISCONNECT:
132 return handle_disconnect(message);
133 case acl::MQTT_SUBACK:
134 return handle_suback(conn, message);
135 case acl::MQTT_PUBLISH:
136 return handle_publish(conn, message);
137 default:
138 printf("unknown type=%d\r\n", (int) type);
139 return false;
140 }
141}
142
143static void usage(const char* procname) {
144 printf("usage: %s -h [help] \r\n"

Callers 1

mainFunction · 0.70

Calls 7

handle_subackFunction · 0.85
handle_connackFunction · 0.70
handle_pingreqFunction · 0.70
handle_pingrespFunction · 0.70
handle_disconnectFunction · 0.70
handle_publishFunction · 0.70
get_typeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…