Subj : Re: Threading and Timeouts To : comp.programming.threads From : David Schwartz Date : Wed Jul 20 2005 02:02 pm "Giancarlo Niccolai" wrote in message news:dbldbm$blc$2@newsread.albacom.net... > Sorry, missing last lines: > > """ > The length of the message to be sent is specified by the length argument. > If > the message is too long to pass through the underlying protocol, send() > shall fail and no data shall be transmitted. > """ > > So there's no way a write() call on a very long set of data will block > until > all the data is sent. Write()/send() will always write what it can (or > refuse to write large blocks if the protocol can't handle it i.e. UDP), > and > immediately return after a single send() operation is posted to the > network > stack. Select saying "socket ready" determines that the network stack > won't > block the next operation on that socket. What? What if the message is longer than the available buffer space but not longer than the underlying protocol can pass? DS .