mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Shutdown/startup TCP server with leader status
This commit is contained in:
@@ -12,4 +12,4 @@ public:
|
||||
virtual int disconnect() = 0;
|
||||
};
|
||||
|
||||
#endif //IWIFIMANAGER_H
|
||||
#endif //ICONNECTIONMANAGER_H
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user