PDA

Click to See Complete Forum and Search --> : Simulating a Slow Network


brockmasterflex
May 8th, 2006, 01:31 PM
I'm having issues with my program when running it on a slow network. Here is the break down, I have a server (that runs embedded c) with a VB6 client software, thats issues commands and recieves data from that server. I've had no issues thus far, until I installed the setup over a very slow network. I'm having alot of timeout issues. That being said, I have no access to this slow network from my home office. Is there a free program to either slow down or bog my local area connection?

Cheers,
Brock

Al42
May 8th, 2006, 04:43 PM
Are you running a simulated server to test your client? If so, just delay the server's responses - stick a timer in it.

dilettante
May 14th, 2006, 01:13 PM
What do you mean by "slow network?"

There are a lot of things that don't show up in Winsock programs when tested on a LAN. Some of these can be network speed related, but the majority are probably due to stream fragmentation introduced by network devices along the path from peer to peer over the Internet.

I have been tempted to write a small and simple simulator for this but I haven't done so yet. It can be tough to create one with full generality, but my idea was to just write a TCP connection relay program that would break incoming data into smaller pieces, clump some pieces up, delay passing them along, etc.

In the meantime though I just use a cheapie dial ISP for testing. You can buy Internet cards much like phone cards to give you a few hours worth of connect time. Then I have one machine dial out to connect, then have my test application connect out through that and back into my LAN (which has a broadband Internet connection).

jaredp
May 17th, 2006, 12:07 PM
Another option is to build an intermediate app. Instead of having the client and server connect directly to each other have them connect to the intermediate app. All it does is relay packets between the client and server. You can use this intermediate app to simulate a slow network by adding lots of sleeps and such.

dilettante
May 17th, 2006, 03:24 PM
That's sort of what I was getting at too jaredp.

The kinds of problems that often appear in Winsock programs when tested over the larger Internet or "slow" connections isn't always reproduced by simply delaying the received data though.

That's why I'd think you'd also want logic to break stuff up into smaller pieces before relaying them as well as clumping others together into bigger "hunks" and relaying those.

iainpb
May 18th, 2006, 06:26 AM
If you are using windows you can

Right click network places
right click lan connection
click configure
click advanced

you can downgrade you link speed here and change the frame size

hope this helps

dilettante
May 24th, 2006, 03:36 PM
That won't help very much I'm afraid.

What you really need to do decent testing is to both slow things down (really slow them down, to 56K bps or slower) and change the stream fragmentation. The latter happens in real life by passing through routers and over various kinds of media (not just Ethernet).

For lack of a good simulator I stand by my earlier idea, which I use a lot: a POTS connection. As I said, I just get a "phone card" sort of ISP and dial out with one machine, letting the other stay on my broadband-connected network. Then I connect out over the Internet and back into my LAN that way.