threadedRead now const uchar *

pipacketextractor Header mode now more flexible
fix splitTime mode
more refactoring
add virtual override to functions
remove piforeach
replace 0 to nullptr
iterate over pimap via iterators
replace CONNECTU to CONNECT# with compile time check
This commit is contained in:
Бычков Андрей
2022-07-26 17:18:08 +03:00
parent a4882dc054
commit d13e68c206
36 changed files with 615 additions and 623 deletions

View File

@@ -170,7 +170,7 @@ bool PIBinaryLog::closeDevice() {
}
bool PIBinaryLog::threadedRead(uchar *readed, int size) {
bool PIBinaryLog::threadedRead(const uchar *readed, int size) {
// piCout << "binlog threaded read";
if (!canRead() || isEnd()) return PIIODevice::threadedRead(readed, size);
is_thread_ok = false;
@@ -429,6 +429,11 @@ int PIBinaryLog::readDevice(void *read_to, int max_size) {
}
int PIBinaryLog::writeDevice(const void * data, int size) {
return writeBinLog(default_id, data, size);
}
void PIBinaryLog::restart() {
bool th = isRunning();
if (th) stopThreadedRead();