开发者

Multiple TCP Socket Requests on PHP

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜