Bandwidth Control

Just starting out? Need help? Post your questions and find answers here.
luke101
User
User
Posts: 36
Joined: Wed Sep 10, 2003 2:33 am

Bandwidth Control

Post by luke101 »

Is there a way to control bandwith of a file being transfered in purebasic
pentium 90mhz, 32mb ram, 1mb video ram, 1gb hd, windows 95.
If it can run on mine it can run on anything

Staight outta Compton
fweil
Enthusiast
Enthusiast
Posts: 725
Joined: Thu Apr 22, 2004 5:56 pm
Location: France
Contact:

Post by fweil »

...,

Do you mean transfered using a network or from disk ?
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
luke101
User
User
Posts: 36
Joined: Wed Sep 10, 2003 2:33 am

Post by luke101 »

i will be trying to control bandwidth on a network
pentium 90mhz, 32mb ram, 1mb video ram, 1gb hd, windows 95.
If it can run on mine it can run on anything

Staight outta Compton
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Post by Doobrey »

Dunno if this is any help to you, I use the following procedure instead of SendNetworkData() for sending at a controlled rate.

Code: Select all

Procedure.l SendNetworkDataLimited(client.l,buffer.l,size.l)
 Shared MaxRate.l
  
  time.l=TimeGetTime_()
  sentbytes.l=SendNetworkData(client,buffer,size)
  time.l=TimeGetTime_()-time
  
  delaytime=((sentbytes*1000)/MaxRate)-time

  If delaytime>0
   Delay(delaytime)
  EndIf
  
 ProcedureReturn sentbytes
EndProcedure
Just remember to set MaxRate (in bytes/second) somewhere in your code.
luke101
User
User
Posts: 36
Joined: Wed Sep 10, 2003 2:33 am

Post by luke101 »

I wanted to control the bandwidth thats outside of the purebasic program.

for instance my brother loves downloading songs and sucking up all the bandwidth. I want to put a program on his computer slow his bandwidth down while im on the internet.

Is this possible

Also wanted to find out if there was a way to block certain websites in purebasic??
pentium 90mhz, 32mb ram, 1mb video ram, 1gb hd, windows 95.
If it can run on mine it can run on anything

Staight outta Compton
Jose
User
User
Posts: 34
Joined: Sat Apr 26, 2003 9:20 pm

Post by Jose »

@luke101
Sounds like what you want is a proxy server, this you could create using PB, but a lot of knwledge and work to do it, its not just single network commands etc.

Search for FREE proxy servers on the Internet.

hope that helps
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

proxy doesn't help, use this program on a gateway: bandwith controller, it's not free though

alternative: there are some progs that run on the client and cap the up / down, but... only if your brother runs them on his machine :-)

to write such a beast in purebasic would be quite a challenge i assume...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

IF you guys are sharing a net connection, and are using a good router/switch, you can limit bandwidth/speed of a MAC address (which is on his ethernet card). Just need to see if your router/switch have that option and get your brother's MAC address.

Of if your router do such a thing as assign addys to computers connected to it, you could try it that way...
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> my brother loves downloading songs and sucking up all the bandwidth.
> I want to put a program on his computer slow his bandwidth down while
> im on the internet.

Which app is he using? Most file-sharing apps have a built-in bandwidth
limiter that you can use... set it to something small instead of the max.
Mr Tickle
User
User
Posts: 25
Joined: Mon Oct 13, 2003 10:33 pm
Location: England, Derbyshire.

Post by Mr Tickle »

Along similar lines I'd like to know if it's possible to make a bandwidth monitor for all downloads so that I can tell if I get near to my bandwidth limit of 20Gig.
Mr Tickle.
Athlon xp 2500+, Gigabyte KT400-FSB333, Gf3 Ti200, SB Live 5.1
thefool
Always Here
Always Here
Posts: 5881
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

you talk about blocking certain web sites. You could mess with his host-file. That file change reference of the network i think. I mean: If hees trying to reach www.google.com and you have an entry in the host file looking like this: http://www.google.com about:blank
a blank page will come up. change the about:blank with http://www.purebasic.com that page will come up. find your host file in the window system32 or system directory somewhere-
Post Reply