Merge remote-tracking branch 'upstream/devirtualize-api-dispatch' into integration

This commit is contained in:
J. Nick Koston
2026-03-20 21:21:56 -10:00
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -234,7 +234,7 @@ void APIConnection::loop() {
this->last_traffic_ = now;
}
// read a packet
this->read_message(buffer.data_len, buffer.type, buffer.data);
this->read_message_(buffer.data_len, buffer.type, buffer.data);
if (this->flags_.remove)
return;
}
+2 -2
View File
@@ -49,7 +49,7 @@ class APIConnection final : public APIServerConnectionBase {
friend class APIServer;
friend class ListEntitiesIterator;
APIConnection(std::unique_ptr<socket::Socket> socket, APIServer *parent);
virtual ~APIConnection();
~APIConnection();
void start();
void loop();
@@ -57,7 +57,7 @@ class APIConnection final : public APIServerConnectionBase {
protected:
// Override read_message here (instead of in APIServerConnectionBase) so the
// compiler can devirtualize and inline on_* handler calls within this class.
void read_message(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data);
void read_message_(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data);
// Auth helpers defined here (not in ProtoService) so the compiler can
// devirtualize is_connection_setup()/on_no_setup_connection() calls
+1 -1
View File
@@ -21,7 +21,7 @@ void APIServerConnectionBase::log_receive_message_(const LogString *name) {
}
#endif
void APIConnection::read_message(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {
void APIConnection::read_message_(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {
// Check authentication/connection requirements
switch (msg_type) {
case HelloRequest::MESSAGE_TYPE: // No setup required
+1 -1
View File
@@ -3077,7 +3077,7 @@ static const char *const TAG = "api.service";
# can devirtualize and inline the on_* handler calls within the same class.
# APIConnection declares the override in api_connection.h.
out = "void APIConnection::read_message(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {\n"
out = "void APIConnection::read_message_(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {\n"
# Auth check block before dispatch switch
out += " // Check authentication/connection requirements\n"