摘要 |
<p>A method and an apparatus for processing a service request based on the hyper text transfer protocol (HTTP) are provided. The method includes the following steps: when a service request is received, after determining that the received service request is processed, a built socket is added into the readable or writable trigger event set when it is built, the readable or writable trigger is selected according to the current link state, the socket in the readable or writable trigger event set is correspondingly processed. In the embodiment of the present invention, according to whether the service request is processed, a socket is added into the corresponding readable or writable trigger event set, only the socket in the readable or writable trigger event set is processed, so the socket set is not needed to be cleared repeatedly and the socket is not needed to be counted and polled for searching link. Therefore, the time needed for pooling the readable or writable socket during each network input and output can be avoided. The processing efficiency of service request is improved. It is applied to maintain a large number of links. The system resource can be saved.</p> |
申请人 |
ZTE CORPORATION;LU, QINYUAN;SHEN, BEIJIE;SUN, YICHAO |
发明人 |
LU, QINYUAN;SHEN, BEIJIE;SUN, YICHAO |