How can you safely tell that a TCP/IP packet was received at the other end?

Rich Shealer

In this project the protocol is to:

  • Open Socket
  • Send Data
  • Wait for the acknowledgement message or timeout
  • If ack arrives in the proper window all is well. close the socket
  • If it times out, close the socket and start over up to N times.

I've noticed in the log that sometimes after the timeout we receive the ack anyway. Since the socket stays open for clean up and stragglers after the close I understand why.

But is there a better way to handle this? I'd like to be sure the connection is really down before reporting something to a line operator.

The timeout right now is an arbitrary value (2.5 seconds) tied to an external timer. It is not in the .Net TCP stack.

Fred

The TCP connection isn't really down unless the socket closes on your side. It takes minutes for TCP to decide the connection is down and close the socket if it doesn't receive any response from the network after sending data.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to safely separate packet data?

From Dev

How to ensure the whole packet is received

From Dev

How can you tell an appointment is a meeting?

From Dev

How can you tell if a Scala object is a function?

From Dev

How can you tell if a value is not numeric in Oracle?

From Dev

Can you tell me how this program is working?

From Dev

How can you tell a USB cable version?

From Dev

How can you safely perform blocking operations in a Netty channel handler?

From Dev

Can I safely connect the power-only-end of a USB-Y cable to an other power source?

From Dev

Can send normal UDP packet with VB.net - But how do you send a WOL packet?

From Dev

How can I access and use the packet contents in the received node using INET in OMNeT++?

From Dev

How the system identifies the received packet is TCP or UDP?

From Dev

How can you tell the size of a register in x86?

From Dev

How can you tell if a pipe operator is the last (or first) in a chain?

From Dev

How can you tell if a file is fully downloaded via HTTP?

From Dev

How can you tell when a Future object is done with its task?

From Dev

How can you tell when the browser is retrieving from a cache?

From Dev

USB 2.0 and USB 3.0, how can you tell the difference?

From Dev

How can you tell the version of Ubuntu on a system in a .sh (bash) script?

From Dev

Can you tell how or what was used to create an Android game?

From Dev

How can you tell the version of Ubuntu on a system in a .sh (bash) script?

From Dev

How To Tell When A JSON Request Is Received In Wordpress?

From Dev

Can you safely close a file that was never opened?

From Dev

Can you use a stringstream to safely convert bidirectionally?

From Dev

Can you use a stringstream to safely convert bidirectionally?

From Dev

can you safely ignore the variable arguments?

From Dev

Can you safely check the sign of infinite?

From Dev

Can you screenshot a Malicious website safely?

From Dev

Can you safely delete folders in AppData?

Related Related

  1. 1

    How to safely separate packet data?

  2. 2

    How to ensure the whole packet is received

  3. 3

    How can you tell an appointment is a meeting?

  4. 4

    How can you tell if a Scala object is a function?

  5. 5

    How can you tell if a value is not numeric in Oracle?

  6. 6

    Can you tell me how this program is working?

  7. 7

    How can you tell a USB cable version?

  8. 8

    How can you safely perform blocking operations in a Netty channel handler?

  9. 9

    Can I safely connect the power-only-end of a USB-Y cable to an other power source?

  10. 10

    Can send normal UDP packet with VB.net - But how do you send a WOL packet?

  11. 11

    How can I access and use the packet contents in the received node using INET in OMNeT++?

  12. 12

    How the system identifies the received packet is TCP or UDP?

  13. 13

    How can you tell the size of a register in x86?

  14. 14

    How can you tell if a pipe operator is the last (or first) in a chain?

  15. 15

    How can you tell if a file is fully downloaded via HTTP?

  16. 16

    How can you tell when a Future object is done with its task?

  17. 17

    How can you tell when the browser is retrieving from a cache?

  18. 18

    USB 2.0 and USB 3.0, how can you tell the difference?

  19. 19

    How can you tell the version of Ubuntu on a system in a .sh (bash) script?

  20. 20

    Can you tell how or what was used to create an Android game?

  21. 21

    How can you tell the version of Ubuntu on a system in a .sh (bash) script?

  22. 22

    How To Tell When A JSON Request Is Received In Wordpress?

  23. 23

    Can you safely close a file that was never opened?

  24. 24

    Can you use a stringstream to safely convert bidirectionally?

  25. 25

    Can you use a stringstream to safely convert bidirectionally?

  26. 26

    can you safely ignore the variable arguments?

  27. 27

    Can you safely check the sign of infinite?

  28. 28

    Can you screenshot a Malicious website safely?

  29. 29

    Can you safely delete folders in AppData?

HotTag

Archive