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

How can I using Websocket ? #32

Open
chichigoodboy opened this issue May 28, 2013 · 7 comments
Open

How can I using Websocket ? #32

chichigoodboy opened this issue May 28, 2013 · 7 comments

Comments

@chichigoodboy
Copy link

What if I want to use my own WebSocket ?

I don't know how to modify the following code...
var socket = new WebSocket('ws://your-websocket-url/');

should I do something in my websocket-url?

@xShirase
Copy link

Hi,
you should replace 'ws://your-websocket-url/' by the url your server
listens on.

Example in my case : 'ws://localhost:8080/''

On Tue, May 28, 2013 at 10:19 AM, chichigoodboy [email protected]:

What if I want to use my own WebSocket ?

I don't know how to modify the following code...
var socket = new WebSocket('ws://your-websocket-url/');

should I do something in my websocket-url?


Reply to this email directly or view it on GitHubhttps://github.com//issues/32
.

@chichigoodboy
Copy link
Author

but in this example ,
I replace
wss://pubsub.pubnub.com/pub-c-43a717c8-5815-4a7a-b118-19cd690fe879/sub-c-a0cf38de-7263-11e2-8b02-12313f022c90/
to
ws://localhost:8080/
and it doesn't working , the console says "Missing Channel"

So , I want to know what I should do in "localhost:8080" , is it echo server or something ?

@xShirase
Copy link

You need a websockets server listening on localhost:8080 or any other
address you choose.
Give me more details, I have a bit of time to help. What do you want to do?
What have you done already?

On Tue, May 28, 2013 at 10:47 AM, chichigoodboy [email protected]:

but in this example ,
I replace
wss://
pubsub.pubnub.com/pub-c-43a717c8-5815-4a7a-b118-19cd690fe879/sub-c-a0cf38de-7263-11e2-8b02-12313f022c90/
to
ws://localhost:8080/
and it doesn't working , the console says "Missing Channel"

So , I want to know what I should do in "localhost:8080" , is it echo
server or something ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-18540745
.

@chichigoodboy
Copy link
Author

I just want to change websocket to my own. but I have no idea :( . I want to do the the websocket example with my own Websocket , this is what I want to do .

@xShirase
Copy link

First, you need to learn how to setup a websockets server. Try this link :
http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/

On Tue, May 28, 2013 at 10:58 AM, chichigoodboy [email protected]:

I just want to change websocket to my own. but I have no idea :( . I want
to do the the websocket example with my own Websocket , this is what I want
to do .


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-18541142
.

@chichigoodboy
Copy link
Author

OK, very thanks!!

@muaz-khan
Copy link
Owner

Hi @chichigoodboy, please read this document to understand WebRTC Experiments signaling concepts because all WebSockets or Socket.io implementations that're not using dynamic channels (i.e. namespaces) will fail to run any experiment. PubNub, Firebase and Pusher all such free services supports dynamic channels feature. You can find socket.io over node.js implementation here. I'll add websockets over node.js soon.

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

3 participants