add PIClientServer::Config, common configuration type for both sides, stream packer and encryption settings
This commit is contained in:
@@ -110,11 +110,6 @@ void PIClientServer::Server::forEachClient(std::function<void(ServerClient *)> f
|
||||
}
|
||||
|
||||
|
||||
void PIClientServer::Server::enableSymmetricEncryption(const PIByteArray & key) {
|
||||
crypt_key = key;
|
||||
}
|
||||
|
||||
|
||||
void PIClientServer::Server::stopServer() {
|
||||
if (!tcp_server) return;
|
||||
is_closing = true;
|
||||
@@ -125,7 +120,7 @@ void PIClientServer::Server::stopServer() {
|
||||
|
||||
void PIClientServer::Server::newClient(ServerClient * c) {
|
||||
clients << c;
|
||||
c->enableSymmetricEncryption(crypt_key);
|
||||
config.apply(c);
|
||||
c->tcp->startThreadedRead();
|
||||
c->connected();
|
||||
piCout << "New client";
|
||||
|
||||
Reference in New Issue
Block a user