partial fix for #608 - when a new TCP API connection arrives, close old one completely

This commit is contained in:
Kevin Hester
2020-12-31 09:52:08 +08:00
parent de37a0c31e
commit cdf416cb73
4 changed files with 39 additions and 15 deletions

View File

@@ -55,12 +55,15 @@ class PhoneAPI
public:
PhoneAPI();
/// Destructor - calls close()
virtual ~PhoneAPI();
/// Do late init that can't happen at constructor time
virtual void init();
// Call this when the client drops the connection, resets the state to STATE_SEND_NOTHING
// Unregisters our observer
void close();
// Unregisters our observer. A closed connection **can** be reopened by calling init again.
virtual void close();
/**
* Handle a ToRadio protobuf