add PIClientServer::Config, common configuration type for both sides, stream packer and encryption settings

This commit is contained in:
2024-09-13 11:08:32 +03:00
parent 996b7ea403
commit 17b902ebcc
8 changed files with 125 additions and 25 deletions

View File

@@ -47,6 +47,7 @@ PIClientServer::Client::~Client() {
void PIClientServer::Client::connect(PINetworkAddress addr) {
if (!tcp || !own_tcp) return;
close();
config.apply(this);
tcp->connect(addr, true);
tcp->startThreadedRead();
piCout << "Connect to" << addr.toString();