Limiting internet usage of a java application
Hi,
I am trying to develop a java application that will indeed need the use of the internet a lot (a web spider). However my school doesn't permit me to use the program with the all capabilities because it really damages the overall internet. So is there a class/command/ or code that can limit the internet usage of java to a pre specified value (like 120 kbs./sec.) All help will be appreciated, thanks in advance....
Regards....
i suppose you could monitor the outgoing/incoming stuff and limit it in whatever way you want, but i'd try to find another piece of software/hardware to do this and not do it in java.
so it is you who broke the internet last week! fuckface!
one way to do this is to get another app to do this for you, this is the best way
another way is figure out how much BW your app will eat, take that number and add sleeps into your crawling/spidering so that over 1 mins your app is using the internets for only 30/seconds, now you are using 1/2 the BW! yey!
thats a pretty gay way though, but only one i can think of right now
Hi,
The computer I am running the application is a general computer that işs used by more than one person so I am not able to use another kind of software that will block the internet since it will block the other users too, so if there is a code that you can give an example of that will be superb.
Himmmm,
That will indeed make the code a lot clumsy and since I implemented it multi-threaded more than some sleep sentences need I think. However if java can return me the BW I am using I think it should have the capability of limiting that BW too.
PS: I have nothing to do with your internet, believe me ;-)
> PS: I have nothing to do with your internet, believe
> me ;-)
>However my school doesn't permit me to use the program with the all >capabilities because it really damages the overall internet.
your lies are transparent
I really couldn't understand wither you are joking or not. What is the connection with my school's internet and you internet? Or even there is some I couldn't really have the permission to test the program in the school so I couldn't understand your problem.
Intranet
Internet
To-may-to
To-mah-to
you have your own internet? sweet!
does your internet have as much porn on it as mine?
> you have your own internet? sweet!
> does your internet have as much porn on it as mine?
This isn't the place to post a link to my video on youporn, is it?
> Intranet
> Internet
>
> To-may-to
> To-mah-to
I didn't understand anything?!!!
> you have your own internet? sweet!
> does your internet have as much porn on it as mine?
Is there a problem bro? I do think too this isn't a place to post such messages. So if you don't wanna help please don't disturb too.
no problems! i just want to know how you broke my internet with your internet, and how much porn your internet has and what kinds, because i am running out of it on my internet
am i disturbing your internet? my 2nd post might help you.
> no problems! i just want to know how you broke my
> internet with your internet, and how much porn your
> internet has and what kinds, because i am running out
> of it on my internet
Ok, since it is proven that you are helpless I am not interested any of your messages from now on.
are you going to put a firewall around your internet blocking my internet?
****, i cant see his messages! i think he blocked my internet! HELP!
> ****, i cant see his messages! i think he blocked my
> internet! HELP!
I think you've just gone blind from too much porn.
> > ****, i cant see his messages! i think he blocked
> my
> > internet! HELP!
>
> I think you've just gone blind from too much porn.
Nothing is better than a great joke ;)
> > > ****, i cant see his messages! i think he
> blocked
> > my
> > > internet! HELP!
> >
> > I think you've just gone blind from too much porn.
>
> Nothing is better than a great joke ;)
WHAT DID YOU SAY?!!?! ITS ALL BLURRED
Can you tell it's Friday?
> Himmmm,
> That will indeed make the code a lot clumsy and since
> I implemented it multi-threaded more than some sleep
> sentences need I think. However if java can return me
> the BW I am using I think it should have the
> capability of limiting that BW too.
You can keep track of how many bytes you've read/written in the last N seconds, and every time you're about to read or write, if the average BW used over the last N seconds is more than the limit, then sleep long enough to bring it down under the limit.
jverda at 2007-7-29 19:21:57 >

> You can keep track of how many bytes you've
> read/written in the last N seconds, and every time
> you're about to read or write, if the average BW used
> over the last N seconds is more than the limit, then
> sleep long enough to bring it down under the limit.
Still painful, but could you give me a sample code that will learn how many bytes did I write or read?
That will be great.
> Still painful, but could you give me a sample code
> that will learn how many bytes did I write or read?
> That will be great.
Look in the docs for the streams, readers, and writers in the java.io package.
jverda at 2007-7-29 19:21:57 >
