What to do if the websockets module?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
raechel implement a module for websockets

have questions on the implementation of the logic


I understand that the WEB server have to take the headers to the connection

to give the appropriate headers to the client and let the connection to the backend.

next hanging constant connection and the WEB server works as a proxy.
by | 4 views

4 Answers

0 like 0 dislike
Let's see how they are made to nodejs, read the specs. But don't forget that the latest version of the Protocol contains a vulnerability, and has been withdrawn from Firefox & Opera.
by
0 like 0 dislike
You have 2 ways. From scratch www.whatwg.org/specs/web-socket-protocol/
Or you can watch how it is done in the server-side socket.io/ file That is responsible for logic ws github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/transports/websocket.js
by
0 like 0 dislike
how to make from scratch — it is more less clear
I wanted to integrate in an existing WEB server
this question
by
0 like 0 dislike
Now nginx can't proxy Websocket about Apache not sure. And no modules for native support of ws I is not found.
You can do this: to raise the WebSocket backend (node.js + socket.io) to put HAProxy in front of nginx, which will forward the requests to the ws-the backend directly.
Well, here's another option in php phpDaemon instead of stack node.js + socket.io: habrahabr.ru/blogs/webdev/82140/
by
110,608 questions
257,186 answers
0 comments
28,070 users