creates a new Socket for bidirectional communication with the server.
url to connect
one or more protocols to use by the socket, default empty