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.
Reply to discussion (solution)
We recommend that you do not do this. you use a parameter in a. php for identification, for example:
Access a. php first? Type = 0;
Access B. php again;
Finally, access a. php? Type = 1;
Your needs cannot be fulfilled!
Your needs cannot be fulfilled!
Ask for help .. Why cannot this requirement be met?
The moderator is right. Since a is blocked, how can he perform the received action?
A can only perform listening, not blocking
The moderator is right. Since a is blocked, how can he perform the received action?
A can only perform listening, not blocking
Okay. It may not have been too clear. Is it the blocking in the listener status?
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.
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)
Yes ......
Ask the moderator weakly. Is it possible to use pcntl or popen for inter-process communication and blocking?
However, pcntl seems somewhat unstable on the web. Popen feels too high and dangerous.
So are you planning to modify the php kernel or the apache kernel?
If you have this capability, you will naturally be able
So are you planning to modify the php kernel or the apache kernel?
If you have this capability, you will naturally be able
It seems that only socket exists. thanks to the moderator.