Home >Backend Development >PHP Tutorial >ng-repeat - PHP loop execution method communication detection in linux nginx environment

ng-repeat - PHP loop execution method communication detection in linux nginx environment

WBOY
WBOYOriginal
2016-10-22 00:14:161188browse

I want PHP to execute a method in a loop to detect communication until the client returns true to stop the loop, otherwise it will continue to loop communication 10 times. What is the best way to implement this type of loop execution method? Because thousands of checks are required at the same time, it may be resource-intensive.

Reply content:

I want PHP to execute a method in a loop to detect communication until the client returns true to stop the loop, otherwise it will continue to loop communication 10 times. What is the best way to implement this type of loop execution method? Because thousands of checks are required at the same time, it may be resource-intensive.

You can’t do it with pure http protocol. You can use websocket in swoole to solve your needs.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn