UWNetworksLab/uProxy-tcp-floodserver

Name: uProxy-tcp-floodserver

Owner: UW Networks Lab

Description: A TCP server that floods the client with random data. Useful for testing TCP clients.

Created: 2015-02-27 21:26:34.0

Updated: 2017-11-14 06:09:26.0

Pushed: 2017-06-20 14:52:50.0

Homepage: null

Size: 14

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

uproxy-tcp-floodserver

A TCP server that floods the client with random data. Useful for testing TCP clients.

Build it with ./build.sh and see the options for running it with ./server -h.

The buffer size controls how large the buffer given to write(2) is. If you see (dt = 1.00) very evenly, and wonder if you could get a higher transfer rate, try a larger buffer size. If your variance in transfer rate is too high, then try a smaller one. The default size is reasonable. The max is 1 Gb.

Example usage

Start the server:

./server -r 100000 -X 1000000000 -p 1227  
ansmitting at a maximum rate of 100,000 bytes/sec.
ansmitting a max of 1,000,000,000 bytes before auto-closing socket.
ading random data into I/O buffer of 4,096 bytes...done
stening to port 1227

And then run:

nc localhost 1224 >/dev/null

To connect to the server. It will show you your transmision rate. It'll auto-terminate after sending a gigabyte over (as specified by the -X flag above). If you don't use the -r limit, you can see how fast your machine is!

Example with a proxy

If you have a proxy on localhost:9999, you can invoke ./server as described above, and then use the client-on-proxy.sh script to connect to it over at proxy.

./client-on-proxy.sh 1227
Language and format setup

For the commas in numbers, set LANG to something reasonable, like:

export LANG=en_US.UTF-8

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.