Sending a message using WS or WSS