Fixed socket writer/reader encryption
Merge pull request #882 from mdogan/fix/3.1/encryption

Fixed and improved socket writer/reader encryption.