Request processing method, device and equipment based on Socket.IO and medium
By intercepting and identifying the request type, using websocket or HTTP proxy technology to forward the request to the Socket.IO port, it solves the problem that the Socket.IO port cannot share the web port, realizes the proxy function of Socket.IO, and avoids the occupation of hardware resources and Port exposed.
Patent Information
- Application Number
- CN202411047540.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-09-24
AI Technical Summary
Existing technology In industrial IoT systems, Socket.IO ports cannot share web ports and need to be opened separately, resulting in increased hardware resource usage. In some scenarios, the installation of a proxy server is not supported, and Socket.IO proxy cannot be implemented. functionality without exposing ports.
By intercepting user access requests on the web port, determining the request type, and using websocket server and client or HTTP proxy technology to forward the request to the Socket.IO port, the proxy function of Socket.IO is realized without exposing the port and increasing hardware costs. .
Without increasing hardware costs, the proxy function of Socket.IO is implemented, avoiding port exposure, meeting user experience and network security requirements, and is suitable for scenarios that do not support the installation of a proxy server.
Smart Images

Figure CN118694753A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a request processing method, device, equipment and medium based on Socket.IO. Background Art
[0002] Socket.IO is a low-latency, bidirectional, event-based communication technology that is widely used in industrial IoT systems with a browser / server (B / S) architecture. Socket.IO mainly communicates through websockets, and has been enhanced to automatically fall back to HyperText Transfer Protocol (HTTP) long polling when websockets are not supported to ensure normal communication.
[0003] Generally, industrial IoT systems with B / S architecture only open one web port for users to access, but Socket.IO cannot share this port and needs to open a separate port for calling. Considering user experience, network security and other aspects, the Socket.IO port should not be exposed, so a network proxy is needed to implement it. In the current solution, a proxy server (nginx) is usually installed to solve this problem. However, this solution will occupy hardware resources and increase hardware costs. In addition, in some scenarios, the installation of a proxy server is not supported.
[0004] It can be seen that how to implement the proxy function of Socket.IO without exposing the Socket.IO port and without increasing the hardware cost is a problem that those skilled in the art need to solve. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a request processing method, apparatus, device and medium based on Socket.IO, which can realize the proxy function of Socket.IO without exposing the Socket.IO port and without increasing the hardware cost.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a request processing method based on Socket.IO, comprising:
[0007] Intercept user access requests to the web port;
[0008] In the case that the request type to which the user access request belongs is a websocket request, based on the created websocket server and websocket client, forwarding the user access request to the Socket.IO server connected to the Socket.IO port;
[0009] In the case that the request type to which the user access request belongs is an HTTP long polling request, the user access request is forwarded to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology, so that the Socket.IO server processes the user access request.
[0010] On the one hand, after intercepting the user access request of the web port, it also includes:
[0011] Determine whether the user access request carries a Socket.IO request identifier;
[0012] In the case where the user access request carries a Socket.IO request identifier, determining whether the request header of the user access request contains a websocket request identifier;
[0013] In a case where the request header of the user access request includes a websocket request identifier, determining that the request type of the user access request is a websocket request;
[0014] When the request header of the user access request does not include a websocket request identifier, it is determined that the request type of the user access request is an HTTP long polling request.
[0015] On the one hand, it also includes:
[0016] In the case that the user access request does not carry the Socket.IO request identifier, the user access request is released.
[0017] On the one hand, after the user access request is released, the method further includes:
[0018] Receive response information fed back by the web server, and feed back the response information to a user terminal connected to the web port.
[0019] On the one hand, based on the created websocket server and websocket client, forwarding the user access request to the Socket.IO server connected to the Socket.IO port includes:
[0020] Creating a websocket server connected to the web port, so as to receive the user access request through the websocket server;
[0021] A websocket client connected to the Socket.IO port is created so as to receive a user access request transmitted by the websocket server through the websocket client, and forward the user access request to the Socket.IO server connected to the Socket.IO port.
[0022] On the one hand, after forwarding the user access request to the Socket.IO server connected to the Socket.IO port based on the created websocket server and websocket client, it also includes:
[0023] Receiving the response information transmitted by the Socket.IO server through the websocket client;
[0024] The response information is fed back to the user terminal connected to the web port through the websocket server.
[0025] On the one hand, forwarding the user access request to the Socket.IO server connected to the Socket.IO port based on HTTP proxy technology includes:
[0026] Use HTTP proxy technology to establish a channel for data interaction with the Socket.IO server;
[0027] The user access request is forwarded to the Socket.IO server connected to the Socket.IO port through the channel.
[0028] The embodiment of the present invention further provides a request processing device based on Socket.IO, comprising an interception unit, a first forwarding unit and a second forwarding unit;
[0029] The interception unit is used to intercept user access requests to the web port;
[0030] The first forwarding unit is used for forwarding the user access request to the Socket.IO server connected to the Socket.IO port based on the created websocket server and websocket client when the request type to which the user access request belongs is a websocket request;
[0031] The second forwarding unit is used to forward the user access request to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology when the request type to which the user access request belongs is an HTTP long polling request, so that the Socket.IO server can process the user access request.
[0032] On the one hand, it also includes a first judgment unit, a second judgment unit, a first judgment unit and a second judgment unit;
[0033] The first determination unit is used to determine whether the user access request carries a Socket.IO request identifier;
[0034] The second judgment unit is used to judge whether the request header of the user access request contains the websocket request identifier when the user access request carries the Socket.IO request identifier;
[0035] The first determination unit is configured to determine that the request type of the user access request is a websocket request when the request header of the user access request includes a websocket request identifier;
[0036] The second determination unit is configured to determine that the request type of the user access request is an HTTP long polling request when the request header of the user access request does not include a websocket request identifier.
[0037] On the one hand, it also includes the release unit;
[0038] The release unit is used to release the user access request when the user access request does not carry the Socket.IO request identifier.
[0039] On the one hand, it also includes a first receiving unit and a first feedback unit;
[0040] The first receiving unit is used to receive response information fed back by the web server;
[0041] The first feedback unit is used to feed back the response information to a user terminal connected to the web portal.
[0042] In one aspect, the first forwarding unit includes a first creation subunit and a second creation subunit;
[0043] The first creation subunit is used to create a websocket server connected to the web port, so as to receive the user access request through the websocket server;
[0044] The second creation subunit is used to create a websocket client connected to the Socket.IO port, so as to receive the user access request transmitted by the websocket server through the websocket client, and forward the user access request to the Socket.IO server connected to the Socket.IO port.
[0045] On the one hand, it also includes a second receiving unit and a second feedback unit;
[0046] The second receiving unit is used to receive the response information transmitted by the Socket.IO server through the websocket client;
[0047] The second feedback unit is used to feed back the response information to the user terminal connected to the web port through the websocket server.
[0048] On the one hand, the second forwarding unit is used to establish a channel for data interaction with the Socket.IO server using HTTP proxy technology; and forward the user access request to the Socket.IO server connected to the Socket.IO port through the channel.
[0049] The embodiment of the present invention further provides a request processing device based on Socket.IO, comprising:
[0050] Memory for storing computer programs;
[0051] A processor is used to execute the computer program to implement the steps of the above-mentioned request processing method based on Socket.IO.
[0052] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the request processing method based on Socket.IO are implemented.
[0053] It can be seen from the above technical solution that the user access request of the web port is intercepted; when the request type to which the user access request belongs is a websocket request, in order not to expose the Socket.IO port and to realize the communication between the web port and the Socket.IO port, a websocket server and a websocket client can be created. Based on the created websocket server and websocket client, the user access request can be forwarded to the Socket.IO server connected to the Socket.IO port. HTTP long polling request has its corresponding proxy technology. When the request type to which the user access request belongs is an HTTP long polling request, the user access request can be forwarded to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology, so that the Socket.IO server can process the user access request. In this technical solution, the type of user access request can be identified by setting the interception function, and corresponding proxy technology can be adopted for different types of requests to realize communication with the Socket.IO server. Without increasing the hardware cost, the proxy function of Socket.IO can be realized by exposing only one web port. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flowchart of a request processing method based on Socket.IO provided by an embodiment of the present invention;
[0056] Figure 2 A schematic diagram of the structure of a request processing device based on Socket.IO provided by an embodiment of the present invention;
[0057] Figure 3 A structural diagram of a request processing device based on Socket.IO provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0060] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0061] Next, a request processing method based on Socket.IO provided by an embodiment of the present invention is introduced in detail. Figure 1 A flowchart of a request processing method based on Socket.IO provided by an embodiment of the present invention, the method comprising:
[0062] S101: Intercepting user access requests to the web port.
[0063] In an embodiment of the present invention, a software module for intercepting network requests can be added to the industrial Internet of Things system with a B / S architecture. When a user accesses the system, all user access requests received by the web port can be intercepted through the software module.
[0064] For intercepted user access requests, the request type can be determined to identify whether the request needs to be processed by the Socket.IO server.
[0065] In actual applications, it can be determined whether the user access request carries a Socket.IO request identifier.
[0066] When the user access request carries the Socket.IO request identifier, it means that the request needs to be processed by the Socket.IO server. In order to further distinguish whether the request is a websocket request or an HTTP long polling request, it can be determined whether the request header of the user access request contains the websocket request identifier.
[0067] When the request header of the user access request contains a websocket request identifier, the request type of the user access request can be determined to be a websocket request. When the request header of the user access request does not contain a websocket request identifier, the request type of the user access request can be determined to be an HTTP long polling request.
[0068] S102: When the request type to which the user access request belongs is a websocket request, based on the created websocket server and websocket client, the user access request is forwarded to the Socket.IO server connected to the Socket.IO port.
[0069] For websocket requests, since there is no mature proxy technology at present, in order not to expose the Socket.IO port and realize the communication between the web port and the Socket.IO port, you can create a websocket server and a websocket client. The websocket server and the websocket client can interact, and the websocket server can realize the connection with the web port, and the websocket client can realize the connection with the Socket.IO port.
[0070] In actual applications, for websocket requests, you can create a websocket server connected to the web port to receive user access requests through the websocket server. Create a websocket client connected to the Socket.IO port to receive user access requests transmitted by the websocket server through the websocket client, and forward the user access requests to the Socket.IO server connected to the Socket.IO port.
[0071] After forwarding the user access request to the Socket.IO server connected to the Socket.IO port, the response information transmitted by the Socket.IO server can be received through the websocket client; the response information is fed back to the user terminal connected to the web port through the websocket server.
[0072] S103: When the request type to which the user access request belongs is an HTTP long polling request, the user access request is forwarded to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology, so that the Socket.IO server processes the user access request.
[0073] For HTTP long polling requests, there is currently a mature proxy technology, namely HTTP proxy technology, so the HTTP proxy technology can be directly used to forward the user's access request to the Socket.IO server connected to the Socket.IO port.
[0074] HTTP proxy technology forwards user access requests to the Socket.IO server connected to the Socket.IO port through the HTTP protocol. In actual applications, HTTP proxy technology can be used to establish a channel for data interaction with the Socket.IO server; forward user access requests through the channel to the Socket.IO server connected to the Socket.IO port, and then push the information returned by the Socket.IO server to the user.
[0075] In the embodiment of the present invention, the user access request can be forwarded to the Socket.IO server through the websocket proxy and HTTP proxy technology built in the system, thereby realizing the function of Socket.IO communication through a unique web port.
[0076] When the user access request does not carry the Socket.IO request identifier, it indicates that the user access request is a common web request. In this case, the user access request can be directly released.
[0077] The released user access request can be processed by the web server, so when the response information fed back by the web server is received, the response information can be fed back to the user terminal connected to the web port.
[0078] It can be seen from the above technical solution that the user access request of the web port is intercepted; when the request type to which the user access request belongs is a websocket request, in order not to expose the Socket.IO port and to realize the communication between the web port and the Socket.IO port, a websocket server and a websocket client can be created. Based on the created websocket server and websocket client, the user access request can be forwarded to the Socket.IO server connected to the Socket.IO port. HTTP long polling request has its corresponding proxy technology. When the request type to which the user access request belongs is an HTTP long polling request, the user access request can be forwarded to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology, so that the Socket.IO server can process the user access request. In this technical solution, the type of user access request can be identified by setting the interception function, and corresponding proxy technology can be adopted for different types of requests to realize communication with the Socket.IO server. Without increasing the hardware cost, the proxy function of Socket.IO can be realized by exposing only one web port.
[0079] Figure 2A schematic diagram of the structure of a request processing device based on Socket.IO provided by an embodiment of the present invention, comprising an interception unit 21, a first forwarding unit 22 and a second forwarding unit 23;
[0080] An interception unit 21 is used to intercept user access requests to the web port;
[0081] The first forwarding unit 22 is used for forwarding the user access request to the Socket.IO server connected to the Socket.IO port based on the created websocket server and websocket client when the request type to which the user access request belongs is a websocket request;
[0082] The second forwarding unit 23 is used to forward the user access request to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology when the request type to which the user access request belongs is an HTTP long polling request, so that the Socket.IO server processes the user access request.
[0083] In some embodiments, it further includes a first determination unit, a second determination unit, a first determination unit, and a second determination unit;
[0084] A first judging unit, used to judge whether the user access request carries a Socket.IO request identifier;
[0085] The second judgment unit is used to judge whether the request header of the user access request contains the websocket request identifier when the user access request carries the Socket.IO request identifier;
[0086] A first determination unit, configured to determine that a request type of the user access request is a websocket request when a request header of the user access request includes a websocket request identifier;
[0087] The second determination unit is configured to determine that the request type of the user access request is an HTTP long polling request when the request header of the user access request does not include a websocket request identifier.
[0088] In some embodiments, a release unit is also included;
[0089] The release unit is used to release the user access request when the user access request does not carry the Socket.IO request identifier.
[0090] In some embodiments, it further includes a first receiving unit and a first feedback unit;
[0091] A first receiving unit, configured to receive response information fed back by the web server;
[0092] The first feedback unit is used to feed back the response information to the user terminal connected to the web port.
[0093] In some embodiments, the first forwarding unit includes a first creation subunit and a second creation subunit;
[0094] A first creation subunit is used to create a websocket server connected to the web port, so as to receive a user access request through the websocket server;
[0095] The second creation subunit is used to create a websocket client connected to the Socket.IO port, so as to receive the user access request transmitted by the websocket server through the websocket client, and forward the user access request to the Socket.IO server connected to the Socket.IO port.
[0096] In some embodiments, it further includes a second receiving unit and a second feedback unit;
[0097] A second receiving unit is used to receive the response information transmitted by the Socket.IO server through the websocket client;
[0098] The second feedback unit is used to feed back the response information to the user terminal connected to the web port through the websocket server.
[0099] In some embodiments, the second forwarding unit is used to establish a channel for data interaction with the Socket.IO server using HTTP proxy technology; and forward the user access request to the Socket.IO server connected to the Socket.IO port through the channel.
[0100] Figure 2 The description of the features in the corresponding embodiments can be found in Figure 1 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.
[0101] It can be seen from the above technical solution that the user access request of the web port is intercepted; when the request type to which the user access request belongs is a websocket request, in order not to expose the Socket.IO port and to realize the communication between the web port and the Socket.IO port, a websocket server and a websocket client can be created. Based on the created websocket server and websocket client, the user access request can be forwarded to the Socket.IO server connected to the Socket.IO port. HTTP long polling request has its corresponding proxy technology. When the request type to which the user access request belongs is an HTTP long polling request, the user access request can be forwarded to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology, so that the Socket.IO server can process the user access request. In this technical solution, the type of user access request can be identified by setting the interception function, and corresponding proxy technology can be adopted for different types of requests to realize communication with the Socket.IO server. Without increasing the hardware cost, the proxy function of Socket.IO can be realized by exposing only one web port.
[0102] Figure 3 A structural diagram of a request processing device based on Socket.IO provided by an embodiment of the present invention, such as Figure 3 As shown, the request processing device based on Socket.IO includes: a memory 30 for storing a computer program;
[0103] The processor 31 is used to implement the steps of the request processing method based on Socket.IO in the above embodiment when executing the computer program.
[0104] The Socket.IO-based request processing device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0105] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0106] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program 301, wherein, after the computer program is loaded and executed by the processor 31, it can implement the relevant steps of the request processing method based on Socket.IO disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 302 may include Windows, Unix, Linux, etc. Data 303 may include but is not limited to user access requests, etc.
[0107] In some embodiments, the Socket.IO-based request processing device may also include a display screen 32 , an input / output interface 33 , a communication interface 34 , a power supply 35 , and a communication bus 36 .
[0108] Those skilled in the art will understand that Figure 3 The structure shown in does not constitute a limitation on the request processing device based on Socket.IO, and may include more or fewer components than those shown in the figure.
[0109] It is understandable that if the request processing method based on Socket.IO in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program codes.
[0110] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the request processing method based on Socket.IO are implemented.
[0111] The above is a detailed introduction to a request processing method, device, equipment and computer-readable storage medium based on Socket.IO provided by an embodiment of the present invention. Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0112] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0113] The above is a detailed introduction to a request processing method, device, equipment and computer-readable storage medium based on Socket.IO provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A request processing method based on Socket.IO, characterized in that: include: Intercept user access requests to the web port; In the case that the request type to which the user access request belongs is a websocket request, based on the created websocket server and websocket client, forwarding the user access request to the Socket.IO server connected to the Socket.IO port; In the case that the request type to which the user access request belongs is an HTTP long polling request, the user access request is forwarded to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology, so that the Socket.IO server processes the user access request.
2. The request processing method based on Socket.IO according to claim 1, characterized in that: After intercepting the user access request to the web port, it also includes: Determine whether the user access request carries a Socket.IO request identifier; In the case where the user access request carries a Socket.IO request identifier, determining whether the request header of the user access request contains a websocket request identifier; In a case where the request header of the user access request includes a websocket request identifier, determining that the request type of the user access request is a websocket request; When the request header of the user access request does not include a websocket request identifier, it is determined that the request type of the user access request is an HTTP long polling request.
3. The request processing method based on Socket.IO according to claim 2, characterized in that: Also includes: In the case that the user access request does not carry the Socket.IO request identifier, the user access request is released.
4. The request processing method based on Socket.IO according to claim 3, characterized in that: After the user access request is released, the method further includes: Receive response information fed back by the web server, and feed back the response information to a user terminal connected to the web port.
5. The request processing method based on Socket.IO according to claim 1, characterized in that: Based on the created websocket server and websocket client, forwarding the user access request to the Socket.IO server connected to the Socket.IO port includes: Creating a websocket server connected to the web port, so as to receive the user access request through the websocket server; A websocket client connected to the Socket.IO port is created so as to receive a user access request transmitted by the websocket server through the websocket client, and forward the user access request to the Socket.IO server connected to the Socket.IO port.
6. The request processing method based on Socket.IO according to claim 5, characterized in that: After forwarding the user access request to the Socket.IO server connected to the Socket.IO port based on the created websocket server and websocket client, the method further includes: Receiving the response information transmitted by the Socket.IO server through the websocket client; The response information is fed back to the user terminal connected to the web port through the websocket server.
7. The request processing method based on Socket.IO according to claim 1, characterized in that: Forwarding the user access request to the Socket.IO server connected to the Socket.IO port based on HTTP proxy technology includes: Use HTTP proxy technology to establish a channel for data interaction with the Socket.IO server; The user access request is forwarded to the Socket.IO server connected to the Socket.IO port through the channel.
8. A request processing device based on Socket.IO, characterized in that: It includes an interception unit, a first forwarding unit, and a second forwarding unit; The interception unit is used to intercept user access requests to the web port; The first forwarding unit is used for forwarding the user access request to the Socket.IO server connected to the Socket.IO port based on the created websocket server and websocket client when the request type to which the user access request belongs is a websocket request; The second forwarding unit is used to forward the user access request to the Socket.IO server connected to the Socket.IO port based on the HTTP proxy technology when the request type to which the user access request belongs is an HTTP long polling request, so that the Socket.IO server can process the user access request.
9. A request processing device based on Socket.IO, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the request processing method based on Socket.IO as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the request processing method based on Socket.IO as claimed in any one of claims 1 to 7 are implemented.
