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

Re: Off Topic: TCP/IP programming




> On Sun, 24 Jan 1999, Eli Hadad wrote:
> 
> > given TCP socket (or other socket),
> > what is the best way to know how much buffer is available at a given moment
> > to write date into without blocking the process ( system call ???)
> > 
> > We don't make the file-descriptor non-blocking, just to know in a
> > given moment the state of the socket buffer.

<to be checked in the Stevens book>

I believe getsockopt(2) w/ SO_RCVBUF and SO_SNDBUF would do.


-- 
Alexander L. Belikoff
Bloomberg L.P. / BFM Financial Research Ltd.
abel@vallinor4.com, abel@bfr.co.il