Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: tcp port open?

From: petr:krenzelok:trz:cz at: 9-Oct-2001 10:22

Maarten Koopmans wrote:
> Hi, > > Is there a way to now if a tcp port is open on both sides. So that a server > (or client) can see whether or not the other side of the pipe is still open?
I am not sure. Designing our camera we looked at Ethereal ( packet monitor, and TCP communication is several stages process of various ACK, SYN, RST, PSH, FIN type packets. There is no real connection on the network, just packets sent here and there. That is why someone can watch your packets (sniff) and see what you are sending, if connected to the same network. So, alive connection is just some state in your tcp stack on your side, irrelevant to other side of "connection". There is also known case of semi-connection - e.g. one side timeouts, and the other side is still able to send packets, which are really delivered, just not probably processed. So, theoretically, if opposite side sends you FIN or RST assigned packet, you should note it. This question is, however, for Holger. We have 'query function available, maybe Rebol somehow knows, if opposite side closed the connection? -pekr-