CN103248679A - Network message passing method - Google Patents

Network message passing method Download PDF

Info

Publication number
CN103248679A
CN103248679A CN2013101498039A CN201310149803A CN103248679A CN 103248679 A CN103248679 A CN 103248679A CN 2013101498039 A CN2013101498039 A CN 2013101498039A CN 201310149803 A CN201310149803 A CN 201310149803A CN 103248679 A CN103248679 A CN 103248679A
Authority
CN
China
Prior art keywords
data
client
server
port
server end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2013101498039A
Other languages
Chinese (zh)
Inventor
于丽
吴登勇
钟笠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Chaoyue Numerical Control Electronics Co Ltd
Original Assignee
Shandong Chaoyue Numerical Control Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Chaoyue Numerical Control Electronics Co Ltd filed Critical Shandong Chaoyue Numerical Control Electronics Co Ltd
Priority to CN2013101498039A priority Critical patent/CN103248679A/en
Publication of CN103248679A publication Critical patent/CN103248679A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a network message passing method which comprises a server and a plurality of clients, wherein the server is in interactive connection with each client; the server monitors all client ports and determines whether a client request exists or not, if the client request exists, data of a sending end is received, and messages extracted from the data are sent to a receiving end; and the clients are used for sending and receiving data, when the data is received, whether the data in a package is that required by a user is determined according to information content, if yes, the data is processed according to information types, and otherwise, the data is abandoned automatically. Compared with the prior art, the plurality of clients are connected to the server, and then the messages are transmitted through the server internet, so that safety and reliability of data passing are guaranteed, and the network message passing method is easy to popularize.

Description

A kind of internet message transmission method
 
Technical field
The present invention relates to a kind of ICT (information and communication technology) field, specifically a kind of fail safe, reliability that has guaranteed that data are transmitted by connecting the clients to service end, passed through a kind of method of network delivery message by service end.
Background technology
Along with data interaction between the present software becomes more and more frequent, each data interaction all needs to write the data-interface program and could realize, does not have a kind of special software service method can be for carrying out data interaction between a plurality of softwares.The software of data interaction is a lot of if desired, and data interaction will be very loaded down with trivial details so, is inconvenient to operate; in addition; fail safe and the reliability of data can't be protected when carrying out data interaction between the mutual software of general data and transmitting, thereby cause loss of data easily, are difficult for promoting.
Summary of the invention
Technical assignment of the present invention is in the deficiencies in the prior art, and a kind of internet message transmission method that guarantees the data interaction fail safe is provided.
Technical scheme of the present invention realizes that in the following manner this a kind of internet message transmission method comprises server end and some clients,
Described server end all is connected alternately with each client, and this server end is monitored all client ports, and judges whether the request of client, if having then the data of receiving end/sending end, the message that extracting data is gone out sends to receiving terminal;
Described client is used for sending data and receives data, judges according to the information content whether these bag data are data of own needs when receiving data, if handle according to information type, if not then losing automatically.
Described server end comprises the destination address that sends from transmitting terminal and message header, information type port numbers from the extracting data outbound message.
The service request that described server end is monitored client at each port refers to, service processes is in resting state always, up to there being a client that this service has been proposed connection request, service thread " was waken up " also and was created a thread separately for client this moment, set up the virtual interface channel of a special use, finish the exchange of data by tunnel.
Described " waking up " process refers to: server end is opened a listening port, be responsible for monitoring the request of client, send the reception circulation with server and take out each client process successively from accepting formation, connect the back and generate new port, create this client of subprocess special disposal then, parent process is then closed new port, continues to handle next client process; And the port of server monitoring usefulness is useless to subprocess, so subprocess is closed it, with the new port and the customer interaction information that produce, closes this connection up to the other side, and subprocess stops.
The data that above-mentioned server receives client at first are saved in the internal memory stream, come segmentation to send data according to the spatial cache size then, till sending, empty internal memory stream again, wait for that send next time; Equally, when client computer receives, judge the size of the stream that receives, if the size of stream is less than or equal to the spatial cache size, then sends and continue that server continues to send the spatial cache size, the client computer circulation receives, till having passed.
The beneficial effect that the present invention compared with prior art produces is:
A kind of internet message transmission method of the present invention is connected to server end with a plurality of clients, and then carry out pass-along message by the server end network, fail safe and reliability that data are transmitted have been guaranteed, the client of mutual some band interactive softwares simultaneously, data exchange process is simple, and is easy to operate.
Description of drawings
Accompanying drawing 1 is structural representation block diagram of the present invention.
Accompanying drawing 2 is realization flow schematic diagrames of the present invention.
Embodiment
Below in conjunction with accompanying drawing a kind of internet message transmission method provided by the present invention is done following detailed description the in detail.
The present invention is primarily aimed at the situation of data interaction inconvenience between a plurality of softwares, and a kind of internet message transmission method based on port communication is provided, and is used for finishing quickly and easily mutual between the data.The present invention includes server end and some clients, structure chart as shown in Figure 1, wherein said server end all is connected alternately with each client, this server end is monitored all client ports, and judge whether the request of client, if have then receive the data of transmit leg, the destination address that sends from the extracting data outbound message and message header, information type port numbers send to data the data receiving software then.
Described client is used for sending data and receives data, judges according to message header or port numbers whether these bag data are data of own needs when receiving data, if handle according to information type, if not then losing automatically.
Server-side application is in the request of a port monitoring to service, that is to say that service processes is in resting state always, up to there being a client that this service has been proposed connection request, service thread " was waken up " also and was created a thread separately for client this moment, set up the virtual interface channel of a special use, finish the exchange of data by tunnel.
To read data not blocked for client computer and server when guaranteeing a plurality of software transmission, the multi-process technology is used in this invention, when in a single day server end receives the request of client, just build an independent process for using the family instead specially, carry out the visit interactive operation of data.
Its concrete data transfer as shown in Figure 2, server end is opened a listening port, be responsible for monitoring the request of client, send the reception circulation with server and take out each client process successively from accepting formation, connect the back and generate new port, create this client of subprocess special disposal then, parent process is then closed new port, continues to handle next client process; And the port of server monitoring usefulness is useless to subprocess, so subprocess is closed it, with the new port and the customer interaction information that produce, closes this connection up to the other side, and subprocess stops.
The data that above-mentioned server receives client at first are saved in the internal memory stream, come segmentation to send data according to the spatial cache size then, till sending, empty internal memory stream again, wait for that send next time; Equally, when client computer receives, judge the size of the stream that receives, if the size of stream is less than or equal to the spatial cache size, then sends and continue that server continues to send the spatial cache size, the client computer circulation receives, till having passed.
The number of connection of server end and client is dynamic, follows a new client-requested, and it is corresponding with this client to produce a new port, carries out independent communication.

Claims (5)

1. internet message transmission method is characterized in that: comprise server end and some clients,
Described server end all is connected alternately with each client, and this server end is monitored all client ports, and judges whether the request of client, if having then the data of receiving end/sending end, the message that extracting data is gone out sends to receiving terminal;
Described client is used for sending data and receives data, judges according to the information content whether these bag data are data of own needs when receiving data, if handle according to information type, if not then losing automatically.
2. a kind of internet message transmission method according to claim 1 is characterized in that: described server end comprises the destination address that sends from transmitting terminal and message header, information type port numbers from the extracting data outbound message.
3. a kind of internet message transmission method according to claim 1 and 2, it is characterized in that: the service request that described server end is monitored client at each port refers to, service processes is in resting state always, up to there being a client that this service has been proposed connection request, service thread " was waken up " also and was created a thread separately for client this moment, set up the virtual interface channel of a special use, finish the exchange of data by tunnel.
4. a kind of internet message transmission method according to claim 3, it is characterized in that: described " waking up " process refers to: server end is opened a listening port, be responsible for monitoring the request of client, send the reception circulation with server and take out each client process successively from accepting formation, connect the back and generate new port, create this client of subprocess special disposal then, parent process is then closed new port, continues to handle next client process; And the port of server monitoring usefulness is useless to subprocess, so subprocess is closed it, with the new port and the customer interaction information that produce, closes this connection up to the other side, and subprocess stops.
5. a kind of internet message transmission method according to claim 4, it is characterized in that: the data that above-mentioned server receives client at first are saved in the internal memory stream, come segmentation to send data according to the spatial cache size then, till sending, empty internal memory stream again, wait for that send next time; Equally, when client computer receives, judge the size of the stream that receives, if the size of stream is less than or equal to the spatial cache size, then sends and continue that server continues to send the spatial cache size, the client computer circulation receives, till having passed.
CN2013101498039A 2013-04-26 2013-04-26 Network message passing method Pending CN103248679A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013101498039A CN103248679A (en) 2013-04-26 2013-04-26 Network message passing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013101498039A CN103248679A (en) 2013-04-26 2013-04-26 Network message passing method

Publications (1)

Publication Number Publication Date
CN103248679A true CN103248679A (en) 2013-08-14

Family

ID=48927900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013101498039A Pending CN103248679A (en) 2013-04-26 2013-04-26 Network message passing method

Country Status (1)

Country Link
CN (1) CN103248679A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101018A (en) * 2016-06-07 2016-11-09 北京赛思信安技术股份有限公司 A kind of infallible data sending method of Based on Distributed mass data loading system
CN106230817A (en) * 2016-07-29 2016-12-14 中国电子科技集团公司第二十八研究所 Distributed mass data transmission method and system
CN111930645A (en) * 2020-07-21 2020-11-13 上海繁易信息科技股份有限公司 TCPIP-based universal USB equipment network transparent transmission system and method
CN114567381A (en) * 2022-01-27 2022-05-31 国网江西省电力有限公司信息通信分公司 Communication signal control method and system based on laser energy supply network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101345948A (en) * 2008-09-03 2009-01-14 内蒙古电子信息职业技术学院 Monitoring mobile phone, mobile phone monitoring system and method for monitoring mobile phone
CN101369987A (en) * 2007-08-16 2009-02-18 阿里巴巴集团控股有限公司 Method and apparatus for establishing communication channel
CN101873269A (en) * 2010-06-24 2010-10-27 杭州华三通信技术有限公司 Data retransmission device and method for distributing buffer to ports
CN102314382A (en) * 2010-07-06 2012-01-11 中兴通讯股份有限公司 Method and module for emergently probing system information
CN102591749A (en) * 2011-12-30 2012-07-18 华中科技大学 Continuous data storage method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369987A (en) * 2007-08-16 2009-02-18 阿里巴巴集团控股有限公司 Method and apparatus for establishing communication channel
CN101345948A (en) * 2008-09-03 2009-01-14 内蒙古电子信息职业技术学院 Monitoring mobile phone, mobile phone monitoring system and method for monitoring mobile phone
CN101873269A (en) * 2010-06-24 2010-10-27 杭州华三通信技术有限公司 Data retransmission device and method for distributing buffer to ports
CN102314382A (en) * 2010-07-06 2012-01-11 中兴通讯股份有限公司 Method and module for emergently probing system information
CN102591749A (en) * 2011-12-30 2012-07-18 华中科技大学 Continuous data storage method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101018A (en) * 2016-06-07 2016-11-09 北京赛思信安技术股份有限公司 A kind of infallible data sending method of Based on Distributed mass data loading system
CN106230817A (en) * 2016-07-29 2016-12-14 中国电子科技集团公司第二十八研究所 Distributed mass data transmission method and system
CN106230817B (en) * 2016-07-29 2019-04-02 中国电子科技集团公司第二十八研究所 Distributed mass data transmission method and system
CN111930645A (en) * 2020-07-21 2020-11-13 上海繁易信息科技股份有限公司 TCPIP-based universal USB equipment network transparent transmission system and method
CN114567381A (en) * 2022-01-27 2022-05-31 国网江西省电力有限公司信息通信分公司 Communication signal control method and system based on laser energy supply network

Similar Documents

Publication Publication Date Title
CN103428226B (en) Method and system for communication of user state and inner core
US20150249699A1 (en) Method and apparatus of performing remote computer file exchange
AU2011370439B2 (en) Method and apparatus for rapid data distribution
CN101834796B (en) Double-controller communication system and method
CN102111419B (en) Message middleware-based client automatic reconnection method
CN102857505B (en) A kind of Internet of Things data bus middleware system
CN104572574A (en) GigE (gigabit Ethernet) vision protocol-based Ethernet controller IP (Internet protocol) core and method
CN102790776A (en) Heartbeat connection normalizing processing method, terminal, server and communication system
CN103248679A (en) Network message passing method
CN105119926B (en) A kind of multichannel duplex signaling method based on Socket connections
US20230080588A1 (en) Mqtt protocol simulation method and simulation device
WO2014194793A1 (en) Method for using shared device in apparatus capable of operating two operating systems
CN104158764A (en) Message processing method and device
CN104486443B (en) Message push system and its method
CN104486187B (en) A kind of CAN communication device and method of dynamic synchronization
CN101552735A (en) Pluggable information bus device based on subscribing mode and realizing method thereof
CN106331051B (en) Document transmission method and system and reception file device send file device
CN104079398A (en) Data communication method, device and system
CN102932458A (en) Point-to-point protocol (PPP) hardware acceleration system and achieving method thereof
CN107104964B (en) Network security terminal and use method
CN100493018C (en) Communication method via bus interface of network and and system thereof
CN102546659A (en) Durable TCP (transmission control protocol) connection method oriented to remote procedure call
CN102256182A (en) RTP (Real-time Transport Protocol)-based video stream fragment framing method
CN104780171A (en) Message transferring method, device and system
CN105591866A (en) Method and system for sharing WIFI, household gateway, and local area network gateway

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130814