Legal claims defining the scope of protection, as filed with the USPTO.
1. A network communication method for use in a system kernel where a network data transceiver thread and a listening socket are created, the method comprising steps of: associating the network data transceiver thread with the listening socket and adding the listening socket into an epoll queue; listening, by the listening socket, events in the epoll queue and performing, when sensing an event requiring to transmit/receive data, a specific operation corresponding to the event and sending a notification to the network data transceiver thread associated with the listening socket; and transmitting/receiving, by the network data transceiver thread, a network data according to the notification from the listening socket, wherein in the step of transmitting/receiving, by the network data transceiver thread, a network data according to the notification from the listening socket comprises: exporting a function symbol table related to a socket from the system kernel and using a standard system call corresponding to the function symbol table to transmit/receive data in a kernel, the step of performing a specific operation corresponding to the event and sending a notification to the network data transceiver thread associated with the listening socket comprises: for a new connection event, receiving the new connection event, putting a handle of the new connection event into the epoll queue, and sending the notification to the network data transceiver thread to receive data; for a readable socket event, sending the notification to the network data transceiver thread to receive data of the readable socket event and putting the received data into a KMQ; or for a KMQ event, directly reading data from the KMQ and sending the notification to the network data transceiver thread to send the read data to a client end, and the step of directly reading data from the KMQ for a KMQ event comprises: mapping, by a data read thread, a memory of the KMQ event to an address space of the data read thread through mmap; and accessing, by the data read thread, the memory of the KMQ event through the address space of the data read thread and reading out KMQ data from the memory when the listening socket senses the KMQ event.
2. A network communication system, the network communication comprising a kernel module, the kernel module comprising: a listening socket module; and a network data transceiver thread module; wherein the listening socket module is associated with the network data transceiver thread module, add itself into an epoll queue, listens to events in the epoll queue, and performs, when sensing an event requiring to transmit/receive data, a specific operation corresponding to the event and send a notification to the network data transceiver thread module to transmit/receive data; wherein the network data transceiver thread module is associated with the listening socket module and transmits/receives data according to the notification from the listening socket module, wherein the network thread transceiver module comprises: a listening socket notification receiving module that receives the notification, for notifying to transmit/receive data, sent from the listening socket module; and a network data transceiver module that exports a function symbol table related to a socket from a system kernel module and uses a standard system call corresponding to the function symbol table to transmit/receive data in the system kernel, wherein the listening socket module comprises: an association module that associates the listening socket module with the network data transceiver thread module; an epoll queue listening module that listens events in the epoll queue; a new-connection-event processing module that receives a new connection event, put a handle of the new connection event into the epoll queue, and notify the network data transceiver thread module to receive data; a socket-event processing module that notifies the network data transceiver thread module to receive data of a readable socket event and put the received data into a KMQ; a KMQ-event processing module that directly reads data from the KMQ and notify the network data transceiver thread module to transmit the read data to a client end; and a network-data-transceiver-thread notification module that sends the notification to the network data transceiver thread module to transmit/receive data when the epoll queue listening module senses a specific event, and wherein the KMQ-event processing module comprises: a KMQ memory mapping module that causes a data read thread to map a memory of the KMQ event to an address space of the data read thread; and a KMQ data reading module that causes the data read thread to access the memory of the KMQ event through the address space of the data read thread mapped by the KMQ memory mapping module and read out a KMQ data from the memory.
3. A non-transitory computer readable storage medium storing a program causing a computer to execute a network communication method for use in a system kernel where a network data transceiver thread and a listening socket are created, the network communication method comprising steps of: associating the network data transceiver thread with the listening socket and adding the listening socket into an epoll queue; listening, by the listening socket, events in the epoll queue and performing, when sensing an event requiring to transmit/receive data, a specific operation corresponding to the event and sending a notification to the network data transceiver thread associated with the listening socket; and transmitting/receiving, by the network data transceiver thread, a network data according to the notification from the listening socket, wherein in the step of transmitting/receiving, by the network data transceiver thread, a network data according to the notification from the listening socket comprises: exporting a function symbol table related to a socket from the system kernel and using a standard system call corresponding to the function symbol table to transmit/receive data in a kernel, the step of performing a specific operation corresponding to the event and sending a notification to the network data transceiver thread associated with the listening socket comprises: for a new connection event, receiving the new connection event, putting a handle of the new connection event into the epoll queue, and sending the notification to the network data transceiver thread to receive data; for a readable socket event, sending the notification to the network data transceiver thread to receive data of the readable socket event and putting the received data into a KMQ; or for a KMQ event, directly reading data from the KMQ and sending the notification to the network data transceiver thread to send the read data to a client end, and the step of directly reading data from the KMQ for a KMQ event comprises: mapping, by a data read thread, a memory of the KMQ event to an address space of the data read thread through mmap; and accessing, by the data read thread, the memory of the KMQ event through the address space of the data read thread and reading out KMQ data from the memory when the listening socket senses the KMQ event.
Unknown
February 24, 2015
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.