News for hackers. Stuff that matters.
Re:PHP 7 Virtual Machine by mschuster91 on Monday April 17, 2017 @12:45PM (#14132354)
> If you run it as a cli script, you can implement pretty much anything. I saw a ftp server once. Crazy.

Yeah, I implemented a simple ircd once. Funny days... but I don't know of any library/framework that could help you with the websocket protocol level, and I'm too old for writing my own ;)

Re:PHP 7 Virtual Machine by geon on Monday April 17, 2017 @02:00PM (#14133018)
Websocket is actually not that complicated. A couple of headers to upgrade the request from HTTP to websocket, then framing of each payload.

But you could use something like websocketd, which spawns a process of your chioce for each client and pipes the websocket to stdin and vice versa.

https://github.com/joewalnes/websocketd

Each PHP process looks like it takes about 5 MB of ram on my laptop, so probably not the best method for 5000+ concurrent users if you use PHP, but still.

Re:PHP 7 Virtual Machine by cr0sh on Monday April 17, 2017 @02:04PM (#14133042)
> I don't know of any library/framework that could help you with the websocket protocol level

FYI - http://socketo.me/