Networking Forums

Networking Forums > Network Hardware > Network Routers > Client's Bandwidth

Reply
Thread Tools Display Modes

Client's Bandwidth

 
 
Ohad
Guest
Posts: n/a

 
      12-29-2004, 12:38 PM
Hello,

I'm a programmer, and am programming a client-server application. I need the
server to know what is the bandwidth of the client, i.e., the bandwitdh of
the internet connection to the client's ISP. How can I get that information
(I can implement it either on the server side or on the client side).

Thanks a lot,
Ohad Asor.


 
Reply With Quote
 
 
 
 
Pablo
Guest
Posts: n/a

 
      01-03-2005, 07:38 PM
You can't 'know' for sure. Here's your dilemma: For what connection are
you trying to determine bandwidth? Example:

Server sits behind firewall on local network. Client sits behind firewall
on a remote (local) network. Both client and server have say, 100 megabit
or possibly gigabit ethernet connections on the lan. Windows may (I haven't
looked into this, but I'll bet there is) have a method or API to
programmatically determine the link speed of any known lan connection-- you
would probably have to enumerate devices and pull statistics for each.
However, this only tells you the speed of your connection direclty on the
client or the server to the LAN, it doesn't tell you about connections over
which you have no control- ie the wan ports on the router, or any switches
or hubs inbetween. For instance, your T1 connection on your wan will
probably only have a 1megabit speed- but the hardware of the router may have
the capability for 100mb or even 1000mb. As we all know, your maximum
bandwidth is only as fast as your slowest link.

Realistically, as a programmer myself, I would probably have the
server/client pieces do their own analysis. Have them make a connection to
eachother, and put a bandwidth test routine IN the program itself. Ie, pass
a fixed amount of data, and time its transfer time. Example:

starttime = GetTimeHack();
TransferData(nBytesOfData);
endtime = GetTimeHack();

totaltime = endtime - starttime.
[TotalBandWidth = nBytesOfData / totaltime]*

*This last bit will depend on the resolution of your time and how you track
your bytes of data- I'll let you handle the specific formulas.

Now, what this gives you is simply time it took to xmit a fixed batch of
data. It doesn't tell you what anyone's maximum HARDWARE capable throughput
is, it only tells you what throughput it was able to achieve under the
circumstances when a test was run. Meaning that other competing network
traffic, problems, slowness, etc., will LOWER that amount. So again,
subsequent attempts at a test may or will give you slightly different
numbers every time. The only way to get CLOSE to the real maximum
throughput is to stop as much network activity as possible on BOTH SIDES and
start the test. The more extraneous activity you can stop the more accurate
your number will be.

Hope this helps.

Paul


"Ohad" <(E-Mail Removed)> wrote in message
news:cqubvo$74u$(E-Mail Removed)...
> Hello,
>
> I'm a programmer, and am programming a client-server application. I need

the
> server to know what is the bandwidth of the client, i.e., the bandwitdh of
> the internet connection to the client's ISP. How can I get that

information
> (I can implement it either on the server side or on the client side).
>
> Thanks a lot,
> Ohad Asor.
>
>



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TS Client Bandwidth requirement Tal Bar-Or Windows Networking 4 04-12-2005 03:41 PM
Client's Bandwidth Ohad Windows Networking 2 12-29-2004 02:51 PM
Client's Bandwidth Ohad Wireless Networks 1 12-29-2004 02:51 PM
Client's Bandwidth Ohad Windows Networking 2 12-29-2004 02:51 PM
Re: Bandwidth throttling on client IP address for a W2k NAT router James Buttle Network Routers 5 09-27-2004 12:23 PM



1 2 3 4 5 6 7 8 9 10 11