Continued improvements to shutdown.

This commit is contained in:
barant committed 2020-04-23 14:25:41 -07:00
1 parent b4ab5fb86a
commit 28292e924a
55 files changed
+459 -367

No files matched your search

+24 -3
View File
@@ -61,9 +61,29 @@ namespace core {
TCPServer &server;
protected:
virtual void onDataReceived(std::string data) override;
///
///
///
virtual void onRegistered() override;
///
/// Override this method to receive data directly from the socket as data is
/// received. If you need data split by line termination characters then
/// override the onLineReceived method instead.
///
virtual void onDataReceived(char *data, int len) override;
///
/// Override the onLineReceived method to receive a string of characters that
/// represents a single line of data terminated by a LF or CRLF. If onDataReceived
/// was overriden this method will not be called unless the onDataReceived calls
/// this method explicitly using the class and member name.
///
virtual void onLineReceived(std::string line);
///
/// This method is called from within the protocol method when protocol is called
@@ -83,7 +103,8 @@ namespace core {
virtual void protocol(std::string data);
private:
char *lineBuffer = NULL;
int lineBufferSize = 0;
std::mutex mtx;
};