In message <CAJ-Vmo=ocmkqeo4aa9mdzwbhabu0uqv+ec_1qkt4aelewn3...@mail.gmail.com>
, you wrote:

>Hi,
>
>Well, I've done this before. More than once. I'm glad that you've
>stuck through helping me understand what nc is doing; I'm
>unfortunately busy doing other things
>
>What you end up doing is:
>
>* tracking the state of the two sockets, both for read EOF and write EOF;
>* whenever you get an EOF from one of the above four conditions, you
>see whether you can still make progress. If so, you don't close the
>socket - you just stop registering for that event. (Eg, if you see
>read EOF on a socket, stop registering for read)
>* if you see that both sides are read EOF'ed, then you can't possibly
>make any more progress, right?
>* .. no, you also have to THEN ensure that all the data you have
>queued is written, OR that you hit write EOF (and thus can't make any
>more progress anyway)
>
>_then_ you shut things down.
>
>Anyway. Leave it with me. Bug me if I don't commit either your fix, or
>rearchitect it to do what I said above (and then test it, obviously :)


Thank you.

Please consider yourself bugged.
(1/2 :-)
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to