I need a telnet-like server that runs on Linux with high performance for load
testing.

Here are the requirements:

- Needs to listen on a configurable port.
- Needs to handle up to 100 simultaneous connections without a process
per connection.
- Needs to be able to carry on a CLI-like conversation, consisting of:
         - A CLI prompt
         - Acceptance of a set of different commands
         - Output various amounts of text in response (0 to 10K lines).
- The data responses have to be interleaved between the connections,
not serial.
- Doesn't need to do any actual authentication, although simulating a
user/password
   prompt is good.
- Listening on multiple IP addresses would be nice, but not necessary.

I think the easiest way to make this work is the CLI "command" would just be
one or more file names, located in a particular directory, to dump back out the
session.  I could them make up a series of text files with the data I wanted.
It should send an error back on a file I/O error.

To make the server run really fast, it could load the files all into RAM on
startup, avoiding any file system calls at all, and perhaps allowing for easier
multiplexing of responses?

Additionally, it would be very good if the responsiveness could be
configured on a
per-session basis.  This could be done, for example, through a config file that
specified responsiveness values for each session number (1-n).  There would be
values for (1) echoing characters (2) initial delay before command response (3)
delay between each line of response.  For example, the file could look
like this:

         # session number, echo delay in ms, command delay in ms, line
delay in ms
         0, 300, 2000, 50
         1, 2000, 10000, 100
         ...

You could get fancy with adding random ranges for these, or trying to
generate a
particular distribution of different responsiveness levels, but I
think the above
would work fine.

Make sense?

- JD
