Transport method of socket should be configurable.

To handle tcp, ssl or tls transport methods, the user should be able to configure this too when connecting the socket to the given host/port. It defaults to tcp as this is the most common socket connection.