Subject: Re: TCP send buffer free space-Conclusion
To: None <itojun@iijlab.net>
From: Dave Gantose <gantose@grc.nasa.gov>
List: tech-net
Date: 07/18/2001 15:46:12
I did not consider the MSG_OOB flag. My understanding is that even if I
used this flag on send, the receiver would also have to pay attention to
this flag in order for it to work. My receiver is ignorant of such things,
as far as I can tell, and I have no control over his processing.
Dave Gantose
Zin Tech
-- itojun@iijlab.net wrote:
>>SUMMARY:
>>I have two data streams being written to a single socket connection:
>>"Important" data (from a data generator), and "Fast" data (read from a
>>file). I wanted a way to prevent Fast data from filling up my TCP Send
>>Buffer and preventing Important data from getting sent. My thought was to
>>discern the amount of free space in the TCP Send Buffer before writing
>>each Fast data record. If there weren't at least X bytes free, I would
>>delay the write until later. ("Important" data would always get written.)
>>But I didn't know how to find the TCP Send Buffer free space. [Note, I'm
>>speaking from an application level here.]
>
> did you consider TCP urgent data? see sendmsg(2) SEND_OOB case,
> recvmsg(2) MSG_OOB case, and probably SO_OOBINLINE socket option.
>
> itojun
--