Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need websockets in a project for HTML5 and PHP, but it don´t works. I read something about that NGINX is not supporting them.

Is there a possibility to install a plugin that brings me the support for that?


share|improve this question

It might be better to post this in stackoverflow as it's more of a development question. Before you post there, do a search. Many websocket questions have already been posted. But since you're apparently seeing this as a computer operation rather than a development issue, let me give you a quick briefing. Although Websockets use a standard form HTTP header request to initiate a connection, it's not HTTP. The full request includes a request to "upgrade" (parameter) to the websocket protocol, which is covered by an entirely new standard. So, that initial request should be handled by a gateway function that sends the request information to websocket software to complete the connection and handle any messages that follow. This of course also involves whatever application software is needed. So, you're not really looking for a "plugin" I'd say, but a websocket "server" we'll call it (it's a bit confusing since both ends can act the same way ... no more "master" / "slave" relationship). The following article has a link at the bottom to a websocket demo webpage. The HTML code can be downloaded. When you click to make the websocket connection, it goes to a gateway that passes the request to the websocket server.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .