How do I use JavaScript (or something like PHP or ASP) to receive requests to open a socket?
I've seen many explanations all over the internet on how to use JavaScript to open an HTML5 WebSocket to a server. But I don't want to do that. I want this to receive connections, and act maybe a bit like a server itself. Is there any way to do this in JavaScript, or 开发者_StackOverflow中文版something similar, or a preprocesser like PHP or ASP?
You can use a server-side software to do this. If you want to write your server in javascript, you should take a look at Node.js. Also, here is a great blog post that will help you get started with Node.js and sockets (to communicate between server and browser)
精彩评论