Hi I am new to socket connection and I have test this application and its working . Normally we use host and port to do socket connection . Now I have host and port with server credential . A webrtc is working on web and websocket connection is using following format if Please tell me how to pass user credential while making connection then please let me know . Following url is used in websocket in JS
url = host+port
function connect(url, me, password)
{
var protocol = window.location.protocol == "http:" ? "ws" : "wss";
ws = new WebSocket(protocol + "://" + url +"/ws/server?username="+ me +"&password=" + password + "&resource=" + me, "xmpp");
ws.onopen = onOpen;
ws.onmessage = onMessage;
ws.onclose = onConnectionClose;
}