views:

105

answers:

1

I have to code a server app where clients open a TCP/IP socket, send some data and close the connection.

The data packets are small < 100 bytes, however there is talk of having them batch their transactions and send multiple packets.

How can I best simulate a dial-up ut connection (using Delphi & Indy components, just FYI)?

Is it as simple as

  • open connection
  • wait a while (what is the definition of "a while"?)
  • close connection
+3  A: 

You can use a network emulator. If you have a Linux machine on hand with NISTnet (an old project but still useful, used some years ago) you can create multiple scnearios limiting bandwidth or other characteristics to the network communication. There is an application called WANEM which seems to do the same but I have not used it so cannot tell you if is good or not.

If you want a modem emulation the you can use com0com which provides exactly that.

Edgar Zavala
Mawg
Why can't you use an network emulator? It has nothing to do with how you programm your app, it's just something that goes between your "Client" application and your "Server" application. You use it to make your fast office network slow (for an particular port number). I used an other Linux slow-buggy-connection-emulator (trickle) to test some of my networked applications.
Cosmin Prund
Mawg, for testing your program in the face of slower or flakier network connections, Wanem is perfect; I have some co-workers who've used it. Why do *you* have to code the app? Shouldn't it be enough that you *have* such an app at your disposal? Shouldn't it be *better*, in fact, that you got such an app *without* spending the time and money of coding it yourself? Or is this a homework assignment? (If it's homework, you should have gotten a better description of the requirements, such as the definition of "a while.")
Rob Kennedy
Hi, Rob, it's not homework (it's been a few decades since I had any of that :-) I have to develop a tester for someone, sending specific data and checking the replies. Some of their users still use dial-up. Wanem does look great though. Thanks for the tip (+1).
Mawg