Creates an encryption layer above the passed websocket.
Instantiating this class is not enough. The shared key pairs have to be set up by a derived class through some kind of key negotiation procedure before the encryption actually works.
This function is called when a plugin is attached.
This function is called when a message is received.
This function is called when a message is sent.
This plugin chops up the outgoing messages into smaller chunks and reassembles them when receiving.
The purpose of this is that we see continuous traffic on slow connections when sending large objects, so that the connections don't time out. This solution can also be used in the future to implement streaming of data.