Re: tcludp - bug when closing 1-of-2 listening ports



On Nov 4, 8:35 pm, Neil Madden <n...@xxxxxxxxxxxxx> wrote:

I wouldn't assume that EOF isn't generated
somewhere -- e.g. testing here (Mac OS X 10.4.11 Intel, Tcl 8.6a4,
TclUDP 1.0.9) shows that [eof $s] on server does indeed return true
after closing the remote socket.

Yes, it is a side-effect of the zero-sized packet. All very well, but
not part of RFC 768. So it is a pathological EOF.

Indeed the behaviour of
(Tcl) UDP sockets seems to be identical to TCP sockets in this respect:
the only difference being that TCP sockets also generate EOF when no
data has been transmitted.

Again, that's just a property of one buggy implementation, not one of
the generic UDP concept. For example, at C level if you just do
send...send..close(), you will never receive any EOF nor even zero-
sized packet on the other side.

Are you sure any actual packet is being transmitted here?

Wireshark is not cheating. The zero-sized packet is directly
correlated with that mutant EOF.

The maintainer is Pat Thoyts I believe.

Thanks for the info Neil. Will try to contact him.

-Alex

.



Relevant Pages

  • Re: tcludp - bug when closing 1-of-2 listening ports
    ... I wouldn't assume that EOF isn't generated ... I can reliably reproduce this here so long as at least 1 byte was sent over the channel to the server. ... Indeed the behaviour of UDP sockets seems to be identical to TCP sockets in this respect: the only difference being that TCP sockets also generate EOF when no data has been transmitted. ...
    (comp.lang.tcl)
  • Re: trouble with double free
    ... At EOF, determine where EOF-n is, fseekit and then fputcuntil EOF again. ... but interactive terminals (or pipes or sockets) rarely are. ... or "tail" commands, either. ...
    (comp.lang.c)
  • Re: fseek()
    ... For the sockets part I suggest you ask again in comp.unix.programming, ... Frankly I found your code extremely difficult to read as the brace ... through the file first, forget about the sockets part till you ... If I dont fseekbeyond EOF, then EOF doesn't get cleared, right? ...
    (comp.lang.c)
  • Re: trouble with double free
    ... At EOF, determine where EOF-n is, fseekit and then fputcuntil EOF again. ... That presumes that the input is seekable. ... Regular files are normally ... but interactive terminals (or pipes or sockets) rarely are. ...
    (comp.lang.c)