Enable a socket connection to send messages as XML or JSON

The parameters are the following