diff options
Diffstat (limited to 'minion/src/wifi_module.hpp')
-rw-r--r-- | minion/src/wifi_module.hpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/minion/src/wifi_module.hpp b/minion/src/wifi_module.hpp index bac5998..6adaf05 100644 --- a/minion/src/wifi_module.hpp +++ b/minion/src/wifi_module.hpp @@ -1,6 +1,7 @@ #pragma once #include "http/request.hpp" +#include "network_connection.hpp" #include <SoftwareSerial.h> #include <stddef.h> @@ -91,15 +92,17 @@ public: /** * Reads a incoming HTTP request. * - * @returns A request. Has a connection ID of -1 if reading the request failed. + * @returns A request. Has a connection with a ID of -1 if reading the request failed. */ auto read_incoming_request() noexcept -> HTTPRequest; - auto close_connection(size_t connection_id) noexcept -> bool; + auto close_connection(NetworkConnection &connection) noexcept -> bool; - auto - send_response(size_t connection_id, size_t status_code, const char *data) noexcept - -> bool; + auto send_response( + const NetworkConnection &connection, + size_t status_code, + const char *data + ) noexcept -> bool; private: SoftwareSerial _serial; @@ -113,7 +116,7 @@ private: */ auto _send_serial(const char *command) noexcept -> bool; - size_t _read_connection_id() noexcept; + int8_t _read_connection_id() noexcept; size_t _read_request_data_length() noexcept; |