Shutdown/startup TCP server with leader status

This commit is contained in:
2025-10-23 23:07:08 -04:00
parent e9e0dfaeed
commit e621b47438
5 changed files with 36 additions and 5 deletions

View File

@@ -12,4 +12,4 @@ public:
virtual int disconnect() = 0;
};
#endif //IWIFIMANAGER_H
#endif //ICONNECTIONMANAGER_H

View File

@@ -8,6 +8,8 @@
class IRPCServer {
public:
virtual ~IRPCServer() = default;
virtual void startup() = 0;
virtual void shutdown() = 0;
virtual int send_msg(char* buffer, uint32_t length) const = 0;
};

View File

@@ -17,6 +17,8 @@ class TCPServer final : public IRPCServer {
public:
TCPServer(int port, const std::shared_ptr<PtrQueue<std::vector<uint8_t>>>& rx_queue);
~TCPServer() override;
void startup() override;
void shutdown() override;
int send_msg(char* buffer, uint32_t length) const override;
private: