A TCP server has IP address and a TCP client has IP address The TCP server is waiting on port number 3333 for a connection request. The client connects to the server and transmits 2000 bytes to the server, which are sent as 4 write operations of 500 bytes each.

So I was wondering if were to write out this command for the receiver would this be correct?

ttcp -ts -l500 -n4 -p3333 -D

or would it be

ttcp -ts -l2000 -n4 -p3333 -D

I'm assuming that it would be the first option but am not confident.

1 Answer 1


You need to have the server in Receive mode (i.e. -r option). Try the below command syntax.

ttcp -r -s -p 3333 -D

Check out the ttcp man page for more details.

Further reading

In order to make this a viable setup, you need a sender and receiver. The sender effectively establishes all of the prameters the tcp session will be benchmarked on.


ttcp -t [-u] [-s] [-p port] [-l buflen] [-b size] [-n numbufs] [-A align] [-O offset] [-f format] [-D] [-v] host [<in]


ttcp -r [-u] [-s] [-p port] [-l buflen] [-b size] [-A align] [-O offset] [-f format] [-B] [-T] [-v] [>out]

Take notice that the receiver is only modifying parameters the sender is specifying. Initially, you were trying to:

-t Transmit mode.
-s stdout.
-l length 
-n number of source buffers
-p port
-D Do not buffer data when sending

As a receiver, you aren't allowed to use, or shouldn't be using, options -t, -n, or -D.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.