Fixed a ReferenceError pointing to buffer instead of onData.buffer
Added SSL support via secure: true

Done quite an overhaul to make it work, can't setup the events prior to socket creation on TLS because it returns a stream. So thats done in setupEvents() which is called once we've setup a socket in connect()