version 4.2.0
move toStdFunction() to pibase.h refactor PIParseHelper, now it much more abstract and useful fix PIIODevice::createFromFullPath() when whitespaces at start or end are presence PIStreamPacker add events for start and end packet receive PIClientServer::ClientBase add virtual methods for start and end packet receive. also one can enable diagnostics with enableDiagnostics() method PICout now call flush() on each end of output add PIString::entries(const PIString & str)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#define piclientserver_client_base_H
|
||||
|
||||
#include "piclientserver_config.h"
|
||||
#include "pidiagnostics.h"
|
||||
#include "pip_client_server_export.h"
|
||||
#include "pistreampacker.h"
|
||||
|
||||
@@ -52,12 +53,18 @@ public:
|
||||
int write(const void * d, const size_t s);
|
||||
int write(const PIByteArray & ba) { return write(ba.data(), ba.size()); }
|
||||
|
||||
void enableDiagnostics();
|
||||
PIDiagnostics::State diagnostics() const;
|
||||
int receivePacketProgress() const;
|
||||
|
||||
Config & configuration() { return config; }
|
||||
|
||||
protected:
|
||||
virtual void readed(PIByteArray data) {}
|
||||
virtual void connected() {}
|
||||
virtual void disconnected() {}
|
||||
virtual void receivePacketStart(int size) {}
|
||||
virtual void receivePacketEnd() {}
|
||||
|
||||
void init();
|
||||
|
||||
@@ -71,6 +78,7 @@ private:
|
||||
|
||||
PIStreamPacker stream;
|
||||
mutable PIMutex write_mutex;
|
||||
PIDiagnostics * diag = nullptr;
|
||||
};
|
||||
|
||||
} // namespace PIClientServer
|
||||
|
||||
Reference in New Issue
Block a user