Retrieving available space from send buffer

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

 



I'm fairly convinced that I saw the solution to this on lkml not too
long ago, but I've been unable to find it again. :(

Netstat finds this information by reading the tx_queue field in 
/proc/net/tcp (focusing on tcp here ;), but I wish to avoid parsing
/proc/net/tcp.

OTOH, if someone could clarify the behaviour of a write to a socket...
Write(2) is permitted to not send the entire contents of your request and
instead to return after only having written a fraction of your request.
What happens then when you throw blocking vs non-blocking sockets into
the mix?
A non-blocking socket returns EAGAIN if the operation would block,
whereas would a blocking socket choose to block until the write is 
complete or return early?

TIA.
-- 
 Chris Wilson                 {*_*}                 spam to bit.bucket@dev.null 
    florence: an old i686, running kernel 2.4.14-pre3 at 1989.01 bogoMIPS.
             Carol says "1146 cannot be formed from 1 2 3 4 5 25."
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux