Websockify to wrap a forking server
Posted
by
Gurjeet Singh
on Stack Overflow
See other posts from Stack Overflow
or by Gurjeet Singh
Published on 2011-11-25T16:05:51Z
Indexed on
2011/11/27
1:50 UTC
Read the original article
Hit count: 551
I came across Websockify [1] and the accompanying Websock client-side javascript library.
AIUI from the Wrap a Program
section in README, Websockify can help you launch a TCP server and rebind its port so that incoming Websockets-based communication is parsed and forwarded to the server on the proper (rebinded) port.
My question is, can this mechanism be used to wrap a server that forks its children which in turn communicate with the client on a different port. Specifically, I am interested in websockifying a Postgres server, which typically listens on port 5432 and for a new incoming connection it forks a child which serves all future request from that client.
(If it helps, Oracle RDBMS and many other servers, RDBMS or not, also use similar method.)
© Stack Overflow or respective owner