Evaluate the php congestion function

Source: Internet
Author: User
Tags socket blocking
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.