Re: send and looping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






With a non-blocking socket, if there is space in the local TCP send buffer,
but the current send is more than the available space in the local send
buffer, it should put a portion of it and return a count equal to that
(that is, less than the total buffer you passed to send).

With a blocking socket (that is, you haven't set non-blocking), it should
block until there is send buffer space for the entire buffer on the current
send.

                        +-DLS


thomas joseph <thomascanny@yahoo.co.nz>@vger.kernel.org on 02/04/2003
09:13:15 PM

Sent by:    linux-net-owner@vger.kernel.org


To:    linux-net@vger.kernel.org
cc:
Subject:    send and looping




Hi All,

I ahve a small question on using send with sockets.
On normal circumstances can I assume that "send always
sends specified bytes completely" or Do I need to
check for the return value and continue looping till
I send the complete data.

 The man pgaes of send say that send normally blocks
 when there is no buffer space left. But the man
 pages  of select_tut say that "send" is not assured
of
 sending the complete data.

 Can somebody suggestme on what approach do I need to
take. Hope this is the right place to ask this
question.

 Thanks and Regards,
 --thomas






http://movies.yahoo.com.au - Yahoo! Movies
- What's on at your local cinema?
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux