Adding support for encrypted connections.
Merge branch 'master' into encrypted-connection
isEncrypted
removing constructor only used in tests
use HOST
On SSLException call sendErrorToAllListeners
use chaining