Socket SEND()

Kenneth Brody kenbrody at bestweb.net
Mon Nov 10 13:12:41 PST 2008


Quoting Fairlight (Mon, 10 Nov 2008 15:34:36 -0500):

> Y'all catch dis heeyah?  Nancy Palmquist been jivin' 'bout like:
>
>> Why wouldn't the socketclose() wait until the transaction is complete to
>> happen?
>
> Why should it?  If I tell something to close, it better darned well close
> how I tell it to and when I tell it to.  Programming isn't supposed to be
> like Windows...  "Are you sure you want to close the socket?"  "Are you
> ABSOLUTELY POSITIVE you want to close the socket?"  "There's outstanding
> data that may not be accounted for, you know.  Perhaps you should sit down,
> take a stress pill, and rethink closing the socket?"
>
> NO, CLOSE THE BLOODY SOCKET AS INSTRUCTED!  :) :) :) :) :)

Perhaps you need a stress pill as well?  :-)

(And how come you have no nose?)

The socket is closed when socketclose() is called.  However, pending
TCP/IP transactions are not canceled/aborted.  At the transport level,
the close will take place after all outgoing data has been sent.

The problem that Nancy is running into is trying to continue reading
from the socket after all data has been read and the socket has been
closed.  (Sort of like reading beyond EOF on a file, except that on a
socket, it's an error.)

[...]

-- 
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list