Is it possible to accept multiple requests (parallel) by using a so开发者_如何学Pythoncket server made on PHP? If possible, how ?
A normal PHP script cannot receive multiple requests. But if you really plan on creating a socket server (started as cmdline php script), then yes it's possible.
Look into http://pear.php.net/package/Net_Server - it provides already some preparations for that. Specifically it uses the pcntl
functions to fork into multiple processes to work on separate TCP requests.
Another option would be http://nanoserv.si.kz/ which has a few more features.
精彩评论