Communication method, device and server for Internet of things
A communication method and technology of a communication device, which are applied in the field of communication, can solve the problems of frequent equipment packets, the inability of select and epoll models to meet socket read and write requirements, and the blocking of server service thread processing, and achieve the effect of fast processing speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2015-06-03
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
Description
technical field
[0001] The present invention relates to the communication field, in particular to a communication method, device and server of the Internet of Things. Background technique
[0002] In recent years, with the development of the Internet of Things, more and more terminals have network functions and need to be connected to the server. Users can remotely operate terminal devices through the server. The server needs an efficient and stable communication system to support the connection of devices and Send and receive data.
[0003] Most of the current communication systems have the following disadvantages:
[0004] (1) As the number of connected devices increases, the operating pressure of the communication system will increase. The single-threaded select and epoll models cannot meet the system's socket read and write requirements, and the packets sent by the device are very frequent, which will block the server Processing of business threads; (2) The data packet...
Examples
Embodiment Construction
[0027] In order to solve the problem in the prior art that the single-thread-based select and epoll models cannot meet the reading and writing requirements of the socket of the system, and the packets sent by the device are very frequent, which will block the processing of the server business thread, the present invention provides a The communication method, device and server of the Internet of Things will be further described in detail below in conjunction with the accompanying drawings and embodiments of the present invention. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
[0028] An embodiment of the present invention provides a communication method for the Internet of Things, the process of which is as follows figure 1 As shown, including steps S102 to S106:
[0029] S102. Set multiple first Selectors to receive connection requests from multiple threads in the connec...