I’m implementing a socket server to an unknown number of clients, I found on internet alot of examples where a max number of clients was passed to socket_listen method, but I don’t know what could be my number of clients.
If I call socket_listen($sock) without a number of $backlog, it will work for a multiple clients server?
Thanks.
You can do this natively – but for this 0MQ is the answer – see the chat example from Ian’s excellent talk
e.g. Server.php: