I have been working with node.js for a while, now when I’m looking deeper into it, for a chat aplication instead of sending message as client – server – client, there must be some possible ways for direct client to client message sending?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Browsers tend to communicate with servers via HTTP. Some implement other protocols, like websockets & SPDY, but again, these are mostly client-server protocols.
Some plug-ins (like Flash & Java) can open ports and communicate client-client. (AFAIK, haven’t actually used them.)
Chrome is the only browser I’m aware of that can (soon) open TCP and UDP sockets from Javascript and do direct client-client communication. At the moment normal web apps can’t do this, your app needs to be run as a “Chrome Packaged App”, with a special
manifestfile.Here are the docs, a blog post describing the feature and a browserify module that can behave like the
netnode.js module in the browser.EDIT: This should probably not be tagged as [node.js] since you’re trying to run in browsers (not in your node vm), this is a Javascript / Browser question.