CN107070970A - A kind of method for closing and device of transmission control protocol TCP connection - Google Patents
A kind of method for closing and device of transmission control protocol TCP connection Download PDFInfo
- Publication number
- CN107070970A CN107070970A CN201611251492.7A CN201611251492A CN107070970A CN 107070970 A CN107070970 A CN 107070970A CN 201611251492 A CN201611251492 A CN 201611251492A CN 107070970 A CN107070970 A CN 107070970A
- Authority
- CN
- China
- Prior art keywords
- server
- client
- bag
- sent
- rst
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Communication Control (AREA)
Abstract
The embodiments of the invention provide the method for closing and device of a kind of transmission control protocol TCP connection, applied to server, methods described includes:The target data request bag sent according to client, the corresponding target data bag of the target data request bag is sent to the client, wherein, the target data bag is the packet indicated comprising PSH;Receive client ACK bags transmitted after last target data bag is received;According to the ACK bags received, at least one RST bag is sent to client;The server end TCP currently with the client being connected is closed to be connected.Using the embodiment of the present invention, the occupancy of Internet resources is reduced.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method for closing of transmission control protocol TCP connection
And device.
Background technology
Download service on current network, that used for transport layer is nearly all TCP (Transmission
Control Protocol, transmission control protocol) agreement.For Transmission Control Protocol, when a TCP connection closed, one normal
, the closing process of complete TCP connections be:Server end sends one and is all sent completely information comprising all data
FIN/ACK (Finish/Acknowledgement, completion/confirmation character) is wrapped;Client receives this bag, will respond immediately to
One ACK bag, shows to have received the information of server end transmission;The data that are received when client process is complete and confirm itself
There is no data to be sent to after server end, a FIN/ACK bag will be sent to server end;Server end receives client
Hold after the FIN/ACK bags sent, reply an ACK bag, while waiting twice of MSL (Maximum segment
Maximum lifetime of lifetime, the TCP bag on network) after the time, completely close TCP connections;And client receives clothes
It is engaged in after the last ACK in device end, just TCP closes connection at once.
But in actual applications, most situations of connection are actively closed for server end, there is problems with:
Even normal connection closed, server end has sent it is all close the bag connected after, into TIME-WAIT (when
It is m- wait) state when, can still take resource, wait for a period of time after (2MSL), just discharge these resources;Most of
In the case of, when server end receives the ACK bags of client transmission, into after FIN-WAIT-2 (end-wait -2) state, experience
Do not receive the FIN/ACK bags that client is sent for a long time yet, cause the stand-by period of server end can be longer, so as to occupy
Resource.It can be seen that, both the above situation, the closing mode of existing TCP connections, the time that server can be caused to wait is longer, enters
And the occupancy of the Internet resources needed for increasing the state that TCP connections are safeguarded to server.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of method for closing and device of transmission control protocol TCP connection, with
Realize the occupancy for reducing Internet resources.Concrete technical scheme is as follows:
, should the embodiments of the invention provide a kind of method for closing of transmission control protocol TCP connection to reach above-mentioned purpose
For server, method includes:
The target data request bag sent according to client, the target data request bag correspondence is sent to the client
Target data bag, wherein, the target data bag for include PSH mark packet;
Receive client ACK bags transmitted after last target data bag is received;
According to the ACK bags received, at least one RST bag is sent to client;
The server end TCP currently with the client being connected is closed to be connected.
Preferably, the server is:
The server of download service is provided.
, should the embodiments of the invention provide a kind of method for closing of transmission control protocol TCP connection to reach above-mentioned purpose
For client, method includes:
According to the target data request bag sent to server, the target data bag that the server is sent is received, wherein,
The target data bag is the packet indicated comprising PSH;
After last target data bag is received, ACK bags are sent to the server;
Receive at least one RST bag that the server is sent according to the ACK bags;
According at least one described RST bag, close the client TCP being currently connected with the server and be connected.
Preferably, at least one RST bag described in the basis, closes the client TCP being currently connected with the server
Connection, including:
For each RST bag at least one described RST bag, the previous packet of the RST bags is judged respectively
Whether PSH marks are included;
If comprising, the TCP all data for receiving buffering area are sent to application layer, close currently with the server phase
Client TCP connections even;
If do not included, close the client TCP being currently connected with the server and be connected.
Preferably, methods described also includes:
After ACK bags are sent to the server, do not received in preset duration server transmission it is described at least
In the case of any one RST bag in one RST bag, close the client TCP being currently connected with the server and be connected.
, should the embodiments of the invention provide a kind of shutoff device of transmission control protocol TCP connection to reach above-mentioned purpose
For server, device includes:
First sending module, for the target data request bag sent according to client, sends described to the client
The corresponding target data bag of target data request bag, wherein, the target data bag is the packet indicated comprising PSH;
First receiving module, for receive the client after last target data bag is received it is transmitted
ACK bags;
Second sending module, for according to the ACK bags received, at least one RST bag to be sent to client;
First closedown module, is connected for closing the current server end TCP being connected with the client.
Preferably, the server is:
The server of download service is provided.
, should the embodiments of the invention provide a kind of shutoff device of transmission control protocol TCP connection to reach above-mentioned purpose
For client, device includes:
Second receiving module, sends for according to the target data request bag sent to server, receiving the server
Target data bag, wherein, the target data bag for include PSH mark packet;
3rd sending module, for after last target data bag is received, ACK to be sent to the server
Bag;
3rd receiving module, for receiving at least one RST bag that the server is sent according to the ACK bags;
Second closedown module, for according at least one described RST bag, closing the client being currently connected with the server
Hold TCP connections.
Preferably, second closedown module, specifically for:
For each RST bag at least one described RST bag, the previous packet of the RST bags is judged respectively
Whether PSH marks are included;
If comprising, the TCP all data for receiving buffering area are sent to application layer, close currently with the server phase
Client TCP connections even;
If do not included, close the client TCP being currently connected with the server and be connected.
Preferably, described device also includes:
3rd closedown module, for after ACK bags are sent to the server, not receiving the service in preset duration
In the case of any one RST bag at least one described RST bag that device is sent, the visitor being currently connected with the server is closed
The TCP connections of family end.
The method for closing and device of a kind of transmission control protocol TCP connection provided in an embodiment of the present invention, server can be with
After at least one RST bag is sent to client, directly close itself and be connected with the server end TCP that client is connected, and
Client can close itself and be connected with the client TCP that server is connected according at least one RST bag, without carrying out
The Internet resources needed for TCP connections are safeguarded in any wait so that TCP connections can be closed in time, release, so as to reduce net
The occupancy of network resource.Certainly, implementing any product or method of the present invention must be not necessarily required to while reaching above-described institute
There is advantage.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet for the method for closing that transmission control protocol TCP provided in an embodiment of the present invention is connected;
Fig. 2 is another flow signal for the method for closing that transmission control protocol TCP provided in an embodiment of the present invention is connected
Figure;
Fig. 3 is a kind of closing schematic diagram of TCP connections provided in an embodiment of the present invention;
Fig. 4 is another flow signal for the method for closing that transmission control protocol TCP provided in an embodiment of the present invention is connected
Figure;
Fig. 5 is a kind of structural representation for the shutoff device that transmission control protocol TCP provided in an embodiment of the present invention is connected;
Fig. 6 is another structural representation for the shutoff device that transmission control protocol TCP provided in an embodiment of the present invention is connected
Figure;
Fig. 7 is the yet another construction signal for the shutoff device that transmission control protocol TCP provided in an embodiment of the present invention is connected
Figure.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
A kind of method for closing of transmission control protocol TCP connection provided in an embodiment of the present invention is carried out first below detailed
Explanation.
Referring to Fig. 1, Fig. 1 is a kind of stream for the method for closing that transmission control protocol TCP provided in an embodiment of the present invention is connected
Journey schematic diagram, applied to server, may include steps of:
S101, the target data request bag sent according to client sends the target data to the client and asked
Corresponding target data bag is wrapped, wherein, the target data bag is the packet indicated comprising PSH;
Specifically, in actual applications, server can be:The server of download service is provided, such as video website
Server etc..
Specifically, for the target data of client request, being sent to server in client and accordingly being marked comprising client
Know and be used for after the target data request bag A of request target data, server receives target data request bag A, so that
The corresponding target data bags of A are sent to the client, wherein, target data bag is comprising PSH (Push pushes bit) mark
Packet.
Specifically, PSH is a mark in TCP header, server can set this to mark when data are sent
Will.Communicated and when transmitting data when server and client interact formula, PSH marks can be added in the packet.At this moment,
Server end will push bit PSH and be set to 1, and one message segment of establishment is sent immediately.Client receives push bit
Put after 1 message segment, just (" push forward ") as soon as possible and consign to reception application process, and no longer wait until whole TCP and receive
Buffering area is being interacted upwards after all filling up.In addition, being masked as prior art, the embodiment of the present invention for target data bag addition PUH
It is not repeated herein.
S102, receives client ACK bags transmitted after last target data bag is received;
Specifically, client is after last target data bag indicated with PSH of server transmission is received, meeting
ACK bag (showing to have received these target data bags that server is sent) is returned to server, and then server can be with
This ACK bag of return is received, wherein, ACK represents that the data client that server is sent has confirmed that reception to confirm character
It is errorless.Server is sent to client after last target data bag, can receive an ACK bag of client return,
For a kind of Existing policies of Transmission Control Protocol.
S103, according to the ACK bags received, at least one RST bag is sent to client;
Specifically, after the ACK bags of client transmission are received, confirming that client has received all target datas
Bag, now directly can send at least one RST (Reset is reset) bag to client.In actual applications, can disposably it send out
One or more RST bags are sent to ensure that transmitting terminal can receive at least one RST bag, prevent RST bags from being sent out in transmitting procedure
It is raw to lose, and then improve fault-tolerance.In actual applications, server end can accordingly be changed, can be being received with realizing
The purpose of at least one RST bag is sent after to ACK bags to client.Wherein, it can be existing skill to be modified in server end
Art, the embodiment of the present invention is not repeated it herein.
S104, closes the server end TCP being currently connected with the client and is connected.
Specifically, in actual applications, server directly sends a RST bag after ACK bags are received to client, simultaneously
Close the server end TCP currently set up with client to be connected, so as to release the shared resource of server end TCP connections.
It can be seen that, using the embodiment of the present invention, server can directly be closed after at least one RST bag is sent to client
Close itself and be connected with the server end TCP that client is connected, and client can close itself according at least one RST bag
The client TCP being connected with server is connected, without carrying out any wait so that TCP connections can be closed in time, be released
The Internet resources for safeguarding that TCP connections are required are put, so as to reduce the occupancy of Internet resources.
Referring to Fig. 2, Fig. 2 is the another of the method for closing that transmission control protocol TCP provided in an embodiment of the present invention is connected
Schematic flow sheet, applied to client, may include steps of:
S201, according to the target data request bag sent to server, receives the target data bag that the server is sent,
Wherein, the target data bag is the packet indicated comprising PSH;
S202, after last target data bag is received, ACK bags are sent to the server;
S203, receives at least one RST bag that the server is sent according to the ACK bags;
S204, according at least one described RST bag, closes the client TCP being currently connected with the server and is connected.
Specifically, at least one RST bag described in the basis, closes the client TCP being currently connected with the server
Connection, can judge the previous packet of the RST bags respectively for each RST bag at least one described RST bag
Whether PSH marks are included;
If comprising, the TCP all data for receiving buffering area are sent to application layer, close currently with the server phase
Client TCP connections even;
If do not included, close the client TCP being currently connected with the server and be connected.
Specifically, in actual applications, it is possible to use prior art in TCP protocol stack judge configuration of option etc.
Deng so that client is received after RST bags, judging the previous packets of RST bags, whether comprising PSH marks, (client is past
Contact is attached transmission data with other servers, so whether the previous packet for needing to judge RST bags is this service
The target data bag that device is sent), it is therefore an objective to it will be distinguished for closing the RST bags of connection and the RST bags for the replacement that makes a mistake.
Wherein, close the client TCP currently with server being connected to be connected, that is, represent and release shared by client TCP connections
Resource.
Exemplary, Fig. 3 is a kind of closing schematic diagram of TCP connections provided in an embodiment of the present invention.As shown in figure 3, most
Latter packet (PSH) includes the packet that PSH indicates for last, is that last includes the target that PSH indicates
Packet, ACK bags represent that the data client that server is sent has confirmed that reception is errorless to carry the bag that ACK confirms character.Clothes
Server end TCP connections are closed at business device end after RST bags are sent, and now server end TCP connections are closed.Client
Before at least one RST bag is received, client TCP connections are in ESTABLISHED states (setting up state), are receiving
After RST bags, client TCP connections are in the state for waiting and closing, and whether a packet before then client is checked wraps
Containing PSH mark, if comprising, notify and wait application layer receive TCP receive buffering area data, otherwise directly closing client
TCP connections, client TCP connections and then can pass directly to closed mode.
It can be seen that, using the embodiment of the present invention, server can directly be closed after at least one RST bag is sent to client
Close itself and be connected with the server end TCP that client is connected, and client can close itself according at least one RST bag
The client TCP being connected with server is connected, without carrying out any wait so that TCP connections can be closed in time, be released
The Internet resources for safeguarding that TCP connections are required are put, so as to reduce the occupancy of Internet resources.
Referring to Fig. 4, Fig. 4 is another for the method for closing that transmission control protocol TCP provided in an embodiment of the present invention is connected
Schematic flow sheet, Fig. 4 embodiments of the present invention increase step S205 on the basis of embodiment illustrated in fig. 2:To the server
Send after ACK bags, do not receive any one RST at least one described RST bag that the server is sent in preset duration
In the case of bag, close the client TCP being currently connected with the server and be connected.
Specifically, in actual applications, after ACK bags are sent to server, even if without any one in preset duration
Individual RST bags reach client, it is also ensured that client is bound to, closing is currently connected the current mechanism of Transmission Control Protocol with server
Client TCP connections.Wherein, preset duration can be set according to situations such as the actual disposition of server and client side
Put, specifically with can realize client do not receive server transmission any one RST bag in the case of, closing currently with clothes
The connected client TCP connections of business device are defined.
It can be seen that, using the embodiment of the present invention, server can directly be closed after at least one RST bag is sent to client
Close itself and be connected with the server end TCP that client is connected, and client can close itself according at least one RST bag
The client TCP being connected with server is connected, without carrying out any wait so that TCP connections can be closed in time, be released
The Internet resources for safeguarding that TCP connections are required are put, so as to reduce the occupancy of Internet resources.Further, do not have even in client
In the case of receiving any one RST bag, also ensure that can necessarily be closed after preset duration currently with server phase
Client TCP connections even, and then ensure that resource can be discharged, reduce the occupancy of Internet resources.
Referring to Fig. 5, Fig. 5 is a kind of knot for the shutoff device that transmission control protocol TCP provided in an embodiment of the present invention is connected
Structure schematic diagram, corresponding with the flow shown in Fig. 1 applied to server, the shutoff device includes:First sending module 501,
One receiving module 502, the second sending module 503, the first closedown module 504.
First sending module 501, for the target data request bag sent according to client, institute is sent to the client
The corresponding target data bag of target data request bag is stated, wherein, the target data bag is the packet indicated comprising PSH;
First receiving module 502, is sent out for receiving the client after last target data bag is received
The ACK bags sent;
Second sending module 503, for according to the ACK bags received, at least one RST bag to be sent to client;
First closedown module 504, is connected for closing the current server end TCP being connected with the client.
Specifically, the server can be:The server of download service is provided.
It can be seen that, using the embodiment of the present invention, server can directly be closed after at least one RST bag is sent to client
Close itself and be connected with the server end TCP that client is connected, and client can close itself according at least one RST bag
The client TCP being connected with server is connected, without carrying out any wait so that TCP connections can be closed in time, be released
The Internet resources for safeguarding that TCP connections are required are put, so as to reduce the occupancy of Internet resources.
Referring to Fig. 6, Fig. 6 is the another of the shutoff device that transmission control protocol TCP provided in an embodiment of the present invention is connected
Structural representation, corresponding with the flow shown in Fig. 2 applied to client, the shutoff device can include:Second receiving module
601st, the 3rd sending module 602, the 3rd receiving module 603, the second closedown module 604.
Second receiving module 601, for according to the target data request bag sent to server, receiving the server hair
The target data bag sent, wherein, the target data bag is the packet indicated comprising PSH;
3rd sending module 602, for after last target data bag is received, being sent to the server
ACK bags;
3rd receiving module 603, for receiving at least one RST bag that the server is sent according to the ACK bags;
Second closedown module 604, for according at least one described RST bag, closing what is be currently connected with the server
Client TCP connections.
Specifically, second closedown module, specifically for:
For each RST bag at least one described RST bag, the previous packet of the RST bags is judged respectively
Whether PSH marks are included;
If comprising, the TCP all data for receiving buffering area are sent to application layer, close currently with the server phase
Client TCP connections even;
If do not included, close the client TCP being currently connected with the server and be connected.
It can be seen that, using the embodiment of the present invention, server can directly be closed after at least one RST bag is sent to client
Close itself and be connected with the server end TCP that client is connected, and client can close itself according at least one RST bag
The client TCP being connected with server is connected, without carrying out any wait so that TCP connections can be closed in time, be released
The Internet resources for safeguarding that TCP connections are required are put, so as to reduce the occupancy of Internet resources.
Referring to Fig. 7, Fig. 7 is another for the shutoff device that transmission control protocol TCP provided in an embodiment of the present invention is connected
Structural representation, it is corresponding with the flow shown in Fig. 4, embodiment illustrated in fig. 7 of the present invention on the basis of embodiment illustrated in fig. 6,
Increase by the 3rd closedown module 605, for after ACK bags are sent to the server, not receiving the service in preset duration
In the case of any one RST bag at least one described RST bag that device is sent, the visitor being currently connected with the server is closed
The TCP connections of family end.
It can be seen that, using the embodiment of the present invention, server can directly be closed after at least one RST bag is sent to client
Close itself and be connected with the server end TCP that client is connected, and client can close itself according at least one RST bag
The client TCP being connected with server is connected, without carrying out any wait so that TCP connections can be closed in time, be released
The Internet resources for safeguarding that TCP connections are required are put, so as to reduce the occupancy of Internet resources.Further, do not have even in client
In the case of receiving any one RST bag, also ensure that can necessarily be closed after preset duration currently with server phase
Client TCP connections even, and then ensure that resource can be discharged, reduce the occupancy of Internet resources.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating
In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Also there is other identical element in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment
Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system
Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of method for closing of transmission control protocol TCP connection, applied to server, it is characterised in that methods described includes:
The target data request bag sent according to client, the corresponding mesh of the target data request bag is sent to the client
Packet is marked, wherein, the target data bag is the packet indicated comprising PSH;
Receive client ACK bags transmitted after last target data bag is received;
According to the ACK bags received, at least one RST bag is sent to client;
The server end TCP currently with the client being connected is closed to be connected.
2. according to the method described in claim 1, it is characterised in that the server is:
The server of download service is provided.
3. a kind of method for closing of transmission control protocol TCP connection, applied to client, it is characterised in that methods described includes:
According to the target data request bag sent to server, the target data bag that the server is sent is received, wherein, it is described
Target data bag is the packet indicated comprising PSH;
After last target data bag is received, ACK bags are sent to the server;
Receive at least one RST bag that the server is sent according to the ACK bags;
According at least one described RST bag, close the client TCP being currently connected with the server and be connected.
4. method according to claim 3, it is characterised in that at least one RST bag described in the basis, close currently with
The connected client TCP connections of the server, including:
For each RST bag at least one described RST bag, judge respectively the RST bags previous packet whether
Include PSH marks;
If comprising, the TCP all data for receiving buffering area are sent to application layer, what closing was currently connected with the server
Client TCP connections;
If do not included, close the client TCP being currently connected with the server and be connected.
5. method according to claim 3, it is characterised in that methods described also includes:
After ACK bags are sent to the server, do not received in preset duration server transmission it is described at least one
In the case of any one RST bag in RST bags, close the client TCP being currently connected with the server and be connected.
6. a kind of shutoff device of transmission control protocol TCP connection, applied to server, it is characterised in that described device includes:
First sending module, for the target data request bag sent according to client, the target is sent to the client
The corresponding target data bag of data request packet, wherein, the target data bag is the packet indicated comprising PSH;
First receiving module, the ACK transmitted after last target data bag is received for receiving the client
Bag;
Second sending module, for according to the ACK bags received, at least one RST bag to be sent to client;
First closedown module, is connected for closing the current server end TCP being connected with the client.
7. device according to claim 6, it is characterised in that the server is:
The server of download service is provided.
8. a kind of shutoff device of transmission control protocol TCP connection, applied to client, it is characterised in that described device includes:
Second receiving module, for according to the target data request bag sent to server, receiving the mesh that the server is sent
Packet is marked, wherein, the target data bag is the packet indicated comprising PSH;
3rd sending module, for after last target data bag is received, ACK bags to be sent to the server;
3rd receiving module, for receiving at least one RST bag that the server is sent according to the ACK bags;
Second closedown module, for according at least one described RST bag, closing the client being currently connected with the server
TCP connections.
9. device according to claim 8, it is characterised in that second closedown module, specifically for:
For each RST bag at least one described RST bag, judge respectively the RST bags previous packet whether
Include PSH marks;
If comprising, the TCP all data for receiving buffering area are sent to application layer, what closing was currently connected with the server
Client TCP connections;
If do not included, close the client TCP being currently connected with the server and be connected.
10. device according to claim 8, it is characterised in that described device also includes:
3rd closedown module, for after ACK bags are sent to the server, not receiving the server hair in preset duration
In the case of any one RST bag at least one the described RST bag sent, the client being currently connected with the server is closed
TCP connections.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611251492.7A CN107070970B (en) | 2016-12-29 | 2016-12-29 | Method and device for closing Transmission Control Protocol (TCP) connection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611251492.7A CN107070970B (en) | 2016-12-29 | 2016-12-29 | Method and device for closing Transmission Control Protocol (TCP) connection |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107070970A true CN107070970A (en) | 2017-08-18 |
CN107070970B CN107070970B (en) | 2020-07-03 |
Family
ID=59624514
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611251492.7A Active CN107070970B (en) | 2016-12-29 | 2016-12-29 | Method and device for closing Transmission Control Protocol (TCP) connection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107070970B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112039863A (en) * | 2020-08-25 | 2020-12-04 | 烽火通信科技股份有限公司 | Method and equipment for backup and smoothing of TCP stream in TCP hot standby architecture |
CN113037873A (en) * | 2021-05-24 | 2021-06-25 | 广东睿江云计算股份有限公司 | Method for optimizing TCP transmission |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101390064A (en) * | 2004-05-06 | 2009-03-18 | 思科技术公司 | Preventing network reset denial of service attacks using embedded authentication information |
US7532577B2 (en) * | 2004-02-13 | 2009-05-12 | Samsung Electronics Co., Ltd. | Managing transmission control protocol (TCP) connections |
CN103581192A (en) * | 2013-11-08 | 2014-02-12 | 冯丽娟 | Method and system for confirming network communication object |
-
2016
- 2016-12-29 CN CN201611251492.7A patent/CN107070970B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7532577B2 (en) * | 2004-02-13 | 2009-05-12 | Samsung Electronics Co., Ltd. | Managing transmission control protocol (TCP) connections |
CN101390064A (en) * | 2004-05-06 | 2009-03-18 | 思科技术公司 | Preventing network reset denial of service attacks using embedded authentication information |
CN103581192A (en) * | 2013-11-08 | 2014-02-12 | 冯丽娟 | Method and system for confirming network communication object |
Non-Patent Citations (1)
Title |
---|
孙飞的博客: "TCP中的RST标志(Reset)详解", 《HTTP://BLOG.CSDN.NET/ERLIB/ARTICLE/DETAILS/50132307》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112039863A (en) * | 2020-08-25 | 2020-12-04 | 烽火通信科技股份有限公司 | Method and equipment for backup and smoothing of TCP stream in TCP hot standby architecture |
CN113037873A (en) * | 2021-05-24 | 2021-06-25 | 广东睿江云计算股份有限公司 | Method for optimizing TCP transmission |
CN113037873B (en) * | 2021-05-24 | 2021-09-07 | 广东睿江云计算股份有限公司 | Method for optimizing TCP transmission |
Also Published As
Publication number | Publication date |
---|---|
CN107070970B (en) | 2020-07-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8024788B2 (en) | Method and apparatus for reliable, high speed data transfers in a high assurance multiple level secure environment | |
US20030212827A1 (en) | Method and system for providing peer-to-peer exchange of terminal information over a meshed network | |
CN101436978A (en) | Method for authentic data transmission using UDP protocol | |
CN107070990A (en) | The method and apparatus of transmitting data resources | |
US8976814B2 (en) | Method of transporting data from sending node to destination node | |
CN107360177B (en) | A kind of message transmitting method and device based on UDP | |
CN109217983B (en) | Industrial Internet of things operation terminal communication protocol design method | |
CN103795632A (en) | Data message transmission method, related equipment and system | |
CN103973414B (en) | A kind of data transmission method and device | |
CN108173920A (en) | Document transmission method based on LORAWAN | |
CN100420197C (en) | Method for guarding against attack realized for networked devices | |
Moons et al. | Using SCHC for an optimized protocol stack in multimodal LPWAN solutions | |
CN107623545A (en) | Document transmission method and device | |
CN104717041A (en) | Method and device for transmitting data | |
CN108322836A (en) | A kind of method and device of data transmission | |
CN104243111A (en) | Method and device for transmitting data packet | |
CN103338184A (en) | Data transmitting method and apparatus, data receiving apparatus and data transmission system | |
CN100442755C (en) | Method for guaranteeing general route package channel transmission reliability | |
CN107070970A (en) | A kind of method for closing and device of transmission control protocol TCP connection | |
CN102055774B (en) | Based on http server and the data processing method thereof of bag process | |
CN102315918B (en) | Method and device for intercommunicating TCP (Transmission Control Protocol) connection with SCTP (Stream Control Transmission Protocol) connection | |
CN104753629B (en) | A kind of data delivery method and apparatus | |
CN101695067B (en) | Data processing method and device based on TCP and digital TV receiver terminal and system | |
AU2003245047A1 (en) | Modifications to TCP/IP for broadcast or wireless networks | |
CN103795705B (en) | For the network and node of the time lock of the data packet of exchanging safety |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |