Method and system for carrying out socket connection and communication maintaining by using http to realize gap crossing

A technology of http protocol and connection channel, which is applied in the field of computer network, can solve problems such as socket communication difficulties, and achieve the effect of ensuring identity

Active Publication Date: 2016-07-06
航天网安技术(深圳)有限公司
View PDF5 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, it is very difficult to realize http forwarding in Socket communication

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for carrying out socket connection and communication maintaining by using http to realize gap crossing
  • Method and system for carrying out socket connection and communication maintaining by using http to realize gap crossing

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] Embodiment 1. A method for implementing Socket keep-alive communication across gatekeepers through http.

[0043] figure 1 It is a flow chart of a method for implementing Socket keep-alive communication across a network gatekeeper through http according to Embodiment 1 of the present invention, as shown in figure 1 As shown, the embodiment of the present invention includes the following steps:

[0044] Step S101: the first port of the first server receives the request initiated by the client, and sends the request packet to the second port of the first server in the form of Socket communication;

[0045] Step S102: after the second port receives the request packet, establish a SocketChannel so that an unbroken connection channel is established between the second port and the third port of the first server;

[0046] Step S103: After the third port receives the request packet through the connection channel, it establishes an http request for communication with the secon...

Embodiment 2

[0074] Embodiment 2. A method for implementing Socket keep-alive communication across gatekeepers through http.

[0075] figure 2 It is a flow chart of a method for implementing Socket keepalive communication across a gatekeeper through http according to Embodiment 2 of the present invention, including the following steps:

[0076] Step S201: the first port of the first server receives the request initiated by the client, and sends the request packet to the second port of the first server in the form of Socket communication;

[0077] Step S202: the second port monitors the client request, and starts a thread for Socket communication after monitoring the client request connection;

[0078] Step S203: After the second port receives the request packet, it initiates a new Socket connection to communicate with the third port of the first server, uses the NIO flow to establish a SocketChannel to simulate Socket communication, and the second port Establishing an uninterrupted conn...

Embodiment 3

[0088] Embodiment 3: A system for implementing Socket keep-alive communication across gatekeepers through http.

[0089] The system of Embodiment 3 of the present invention will be described in detail below.

[0090] The system for implementing Socket keep-alive communication across a network gatekeeper through http according to Embodiment 3 of the present invention includes: a client, a first server, a second server, and a service server, and there is a network between the first server and the second server. Gate, where:

[0091] The first server is outside the gatekeeper, the client sends the request data packet to the first server through Socket, and the first server sends the processing result data packet from the second server through Socket to said client;

[0092] The second server has established a storage mapping table in the gatekeeper, and the first server communicates with the second server using the http protocol, and the first server sends the The request pack...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention, which belongs to the computer network field, discloses a method and system for carrying out socket connection and communication maintaining by using http to realize gap crossing. A first server receives a request initiated by a client, a socket channel is established and then a non-disconnected connecting channel is established; a third port establishes an http request for carrying out communication with a second server and sends a request data packet to a fourth port of the second server; the fourth port determines whether an IP address of the client exits in a storage mapping table; if not, new socket connection with a service server is established to send the request data packet; and if so, existed socket connection is obtained from the storage mapping table to send the request data packet; and the service server returns a processed result data packet to the client by a communication way of an original path. According to the invention, the client socketsat the same IP address maintain the same connection all the time during the multi-times communication process.

Description

technical field [0001] The invention relates to the technical field of computer networks, in particular to a method and a system for implementing Socket keep-alive communication across network gatekeepers through http. Background technique [0002] In daily work, sometimes it is necessary to improve the communication services originally connected through Socket in the gatekeeper to be able to interact with other users on the Internet. Usually, the Socket connection is a TCP connection. Once the Socket connection is established, the communication parties can start to send data content to each other until the connection between the two parties is disconnected. However, in actual network applications, the communication between the client and the server often needs to pass through multiple intermediate nodes, such as routers, gateways, firewalls, etc. Most firewalls will close the connection that has been inactive for a long time by default, resulting in the disconnection of the...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/06
Inventor 闫京王涛任思凯郭欣宋颖甘景全
Owner 航天网安技术(深圳)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products