Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Nov 1996 13:25:00 -0800
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        Archie Cobbs <archie@whistle.com>
Cc:        jgreco@brasil.moneng.mei.com (Joe Greco), hannibal@cyberstation.net, hackers@freebsd.org
Subject:   Re: Limiting bandwidth on a socket? (SO_RCVBUF?) 
Message-ID:  <199611062125.NAA11085@rah.star-gate.com>
In-Reply-To: Your message of "Wed, 06 Nov 1996 12:46:15 PST." <199611062046.MAA08387@bubba.whistle.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
What about kernel modifications?
In a commercial environment it can  be very beneficial to provide rate
control. QOS --- that ugly old OSI term or more recently reservation
bandwith services.

	Amancio

>From The Desk Of Archie Cobbs :
> 
> > > I'm trying to come up with some way to limit the amount of bandwidth on a
> > > socket, so I can have my mail and large files retrieve without slowing
> > > down a telnet session that much.
> > >
> > > [ ... ]
> > >
> > > Anyone know how to do this?
> > 
> > int s, rval;
> > 
> > s = socket(...);
> > 
> > while ((rval = read(..., 1024)) > 0) {
> > 	sleep(1);
> > }
> > 
> > if (rval < 0) {
> > 	perror(...);
> > }
> 
> This also might be a good application for divert(4) sockets .. just
> stick in a daemon that throttles the I/O on whatever connections you
> want to throttle... basically, doing the same as above except your
> exiting applications don't have to be modified.
> 
> -Archie
> 
> ___________________________________________________________________________
> Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611062125.NAA11085>