There is a demand for php blocking functions. a. php cannot end after execution is complete and needs to be blocked. B. php then communicates with the external and transmits the external data to a. php in the blocking state. Then it is better not to use socket blocking on the network. ------ Solution ------------------ the moderator is right. Since a is blocked, how can I execute the received action? Evaluate the php blocking function
There is such a requirement that a. php cannot end after execution is complete, and it needs to be blocked. B. php then communicates with the external and transmits the external data to a. php in the blocking state.
Then it is better not to use socket blocking on the network.
------ Solution --------------------
The moderator is right. Since a is blocked, how can he perform the received action?
A can only perform listening, not blocking
------ Solution --------------------
In an http session, php is used as the working program of the http server.
If php is suspended, the http server will not terminate this session because it has not been returned.
Because http is a stateless protocol, the session cannot be reimported. (I want to interject, but I don't know where to plug in)
I guess you are planning to push the server.
This application is closely related to browsers, so php is not yet supported (of course, some server languages are already supported)
We can see that such php applications require socket as servers. And you don't want to do that.