version 4.0.0_alpha

in almost all methods removed timeouts in milliseconds, replaced to PISystemTime
PITimer rewrite, remove internal impl, now only thread implementation, API similar to PIThread
PITimer API no longer pass void*
PIPeer, PIConnection improved stability on reinit and exit
PISystemTime new methods
pisd now exit without hanging
This commit is contained in:
2024-07-30 14:18:02 +03:00
parent f07c9cbce8
commit 1c7fc39b6c
58 changed files with 677 additions and 1191 deletions

View File

@@ -1,6 +1,6 @@
#include "piliterals_time.h"
#include "pip.h"
int main(int argc, char * argv[]) {
PIByteArray rnd;
rnd.resize(1024 * 1024, 'x');
@@ -12,7 +12,7 @@ int main(int argc, char * argv[]) {
// c.setReopenEnabled(true);
PICloudServer s("127.0.0.1:10101");
auto clients = new PIVector<PICloudServer::Client *>();
CONNECTL(&tm, tickEvent, ([&](void *, int) {
CONNECTL(&tm, tickEvent, ([&](int) {
if (c.isConnected()) {
PIString str = "ping";
piCout << "[Client] send:" << str;
@@ -67,7 +67,7 @@ int main(int argc, char * argv[]) {
} else {
s.startThreadedRead();
}
tm.start(1000);
tm.start(1_Hz);
PIKbdListener ls;
ls.enableExitCapture(PIKbdListener::F10);
ls.start();