Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket connection via server authentication #45

Open
saurabhsharma01 opened this issue May 24, 2015 · 0 comments
Open

Socket connection via server authentication #45

saurabhsharma01 opened this issue May 24, 2015 · 0 comments

Comments

@saurabhsharma01
Copy link

Hi I am new to socket connection and I have test this application and its working .
But Here only mentioned 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 you can tell me how to pass user password while 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;

    webrtc.jid = me + "@" + window.location.hostname + "/" + me;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant