I want to send params in the first connect to socket server.
I'm looking for a sending method like:
var wsUrl = 'ws://localhost:9300',
wsHandle = new WebSocket(wsUrl, [myParam]);
or like:
var wsUrl = 'ws://localhost:9300',
wsHandle = new WebSocket(wsUrl, {
myKey: myParam
});
Anyone help me with some keywords? Thanks for your answers.