add encryption
This commit is contained in:
@@ -54,6 +54,8 @@ public:
|
||||
int write(const void * d, const size_t s);
|
||||
int write(const PIByteArray & ba) { return write(ba.data(), ba.size()); }
|
||||
|
||||
void enableSymmetricEncryption(const PIByteArray & key);
|
||||
|
||||
protected:
|
||||
virtual void readed(PIByteArray data) {}
|
||||
virtual void connected() {}
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
void setClientFactory(std::function<Client *()> f) { client_factory = f; }
|
||||
|
||||
void write(Client * c, const PIByteArray & data);
|
||||
void enableSymmetricEncryption(const PIByteArray & key);
|
||||
|
||||
protected:
|
||||
virtual void readed(Client * c, PIByteArray data) {}
|
||||
@@ -61,6 +61,7 @@ private:
|
||||
std::function<Client *()> client_factory;
|
||||
PIEthernet * tcp_server = nullptr;
|
||||
PIThread * clean_thread = nullptr;
|
||||
PIByteArray crypt_key;
|
||||
PIVector<Client *> clients;
|
||||
PIMutex clients_mutex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user