The purpose of this sample is to measure the throughput capacity of the transmission channel as well as to benchmark the implementation efficiency.
SpeedTest is operated from the command line. It can be invoked using the following syntax:
SpeedTest server tcp|udp <port> SpeedTest client tcp <hostname> <port> <numMessages> <messageSize> SpeedTest client udp <hostname> <port> <numMessages> <messageSize> <reliable:true|false>
For example:
Start a server in UDP mode, listening in the port 2345.
SpeedTest server udp 2345
Connect as a client to a server running in UDP mode. Measure the performance by sending 100000 reliable messages of 450 bytes each.
SpeedTest client udp 192.168.0.100 2345 100000 450 true
When the test is run, the client begins to upload messages of the given size to the server until the count limit is reached.
The output should look similar to the following:
C:\Users\clb\Desktop\SpeedTest>SpeedTest client udp 192.168.0.100 2345 100000 450 true
Connected to 192.168.0.100:2345 (UDP, connected=true, maxSendSize=1400, sock: 192.168.0.22:61056, peer: 192.168.0.100:2345).
Starting speed test.
Connection Status: ConnectionOK.
OutboundMessagesPending: 985.
InboundPartialBytes: 0.
Connected: true.
Datagram flow Inrate: 60/sec.
Datagram flow Outrate: 592/sec.
Packet loss count: 0.00.
Packet loss rate: 0.00.
Round-Trip Time: 6.80ms.
Ping: 3.40ms.
LastHeardTime: 19.97ms.
Datagrams in: 28.60/sec.
Datagrams out: 483.41/sec.
Messages in: 28.60/sec.
Messages out: 1450.63/sec.
Bytes in: 365B/sec.
Bytes out: 642.978KB/sec.
Finished speed test.
C:\Users\clb\Desktop\SpeedTest>
1.7.1