发明名称 |
SOCKET PROCESSING METHOD AND DEVICE AND WEB SERVER |
摘要 |
The method for processing a Socket is applied in a Web server. The Web server is based on a platform for providing an asynchronous unblocking-mode Socket. The method includes: monitoring a client request of a port of the Web server; according to the monitored client request, registering a Socket event through an asynchronous selection operation; judging whether the Socket event is a READ event and/or a WRITE event, to obtain a judgment result; when the judgment result indicates that the Socket event is a READ event and/or a WRITE event, starting timing; and when the timing reaches a preset threshold and the Web task does not receive a first semaphore sent by a Socket underlying layer, sending a second semaphore to the Web task, so that the Web task can be activated, and a corresponding procedure is processed according to the Socket event. |
申请公布号 |
US2015271294(A1) |
申请公布日期 |
2015.09.24 |
申请号 |
US201314438681 |
申请日期 |
2013.08.26 |
申请人 |
ZTE CORPORATION |
发明人 |
Ma Wenjuan |
分类号 |
H04L29/08;H04L29/06 |
主分类号 |
H04L29/08 |
代理机构 |
|
代理人 |
|
主权项 |
1. A method for processing a Socket, applied in a Web server, wherein the Web server is based on a platform for providing an asynchronous unblocking-mode Socket; and the method for processing a Socket comprises:
monitoring a client request of a port of the Web server; according to the monitored client request, registering a Socket event through an asynchronous selection operation; judging whether the Socket event is a READ event and/or a WRITE event, to obtain a judgment result; when the judgment result indicates that the Socket event is a READ event and/or a WRITE event, starting timing; when the timing reaches a preset threshold and the Web task does not receive a first semaphore sent by a Socket underlying layer, sending a second semaphore to the Web task, to enable the Web task to be activated, and processing a corresponding procedure according to the Socket event. |
地址 |
Shenzhen, Guangdong CN |