Simplification, refactoring, cleanup of the bwtester codebase.
This does not introduce any (significant) behaviour changes; the
applications are compatible with the version before this change.
One breaking change is that we've removed the rather pointless -id and
-log_dir flags from the bwtestserver.
In the client, the output format has been slightly adapted.
The motivation for this is to make it easier to convert bwtester to use
the pan library. In particular, one goal was to make HandleDCCnnSend/Receive
functions (shared between client and server) dumber, i.e making them do
nothing but Write/Read on the connection. This will help to adapt this to
pan with its asymmetric dialed/listening connections.
The most relevant changes are:
split functions, reduce duplicate code
try to get some semblance of reasonable error handling
simplify the termination of tests by simplifying; set Read/Write
deadlines for the data channel (once!), ensuring that the reader/write
routines abort in time.
remove ExpectedFinishTime from BwtestResults struct. Was only used
for (unnecessarily confusing) internal bookkeeping, does not need to
be on the wire. The "gob" encoding on the wire is still compatible.
server: avoid excessive concurrent access to results map to get rid of
the excessive locking code. Only add the result entry once it's
actually available (it's so much easier...).
client: shorten output format for Interarrival time (~analogous to
ping output)
Note that this is a limited cleanup pass, trying not to change too much
at once and not to introduce breaking changes. The code (and the
functionality) can clearly still be improved...
Simplification, refactoring, cleanup of the bwtester codebase.
This does not introduce any (significant) behaviour changes; the applications are compatible with the version before this change. One breaking change is that we've removed the rather pointless
-id
and-log_dir
flags from the bwtestserver. In the client, the output format has been slightly adapted.The motivation for this is to make it easier to convert bwtester to use the pan library. In particular, one goal was to make
HandleDCCnnSend/Receive
functions (shared between client and server) dumber, i.e making them do nothing but Write/Read on the connection. This will help to adapt this to pan with its asymmetric dialed/listening connections.The most relevant changes are:
ExpectedFinishTime
fromBwtestResults
struct. Was only used for (unnecessarily confusing) internal bookkeeping, does not need to be on the wire. The "gob" encoding on the wire is still compatible.Note that this is a limited cleanup pass, trying not to change too much at once and not to introduce breaking changes. The code (and the functionality) can clearly still be improved...
This change is