Adds the ability to retry connections to boxes, as occasionally TCP connections will
fail when rapidly opening and closing hostlink in multiple programs in sequence.
Explicit memsets are to avoid uninitialised memory (last few bytes of BootReq)
getting sent. It is benign in this scenario, but valgrind doesn't know this.
Flushes on stdout are for cases where you are sending thread output to stdout
and into another process (e.g. piping it through grep or something). Forcing
the flush when there is no more data avoids the situation where the string you
are looking for has been read, but not yet sent. In principle the fflush could lower
performance, but it is followed by a 10ms wait, so seems fairly safe.
Tested on ayres and byron (2x2 boxes), though only by building and then running "hello".
Adds the ability to retry connections to boxes, as occasionally TCP connections will fail when rapidly opening and closing hostlink in multiple programs in sequence.
Explicit memsets are to avoid uninitialised memory (last few bytes of BootReq) getting sent. It is benign in this scenario, but valgrind doesn't know this.
Flushes on stdout are for cases where you are sending thread output to stdout and into another process (e.g. piping it through grep or something). Forcing the flush when there is no more data avoids the situation where the string you are looking for has been read, but not yet sent. In principle the fflush could lower performance, but it is followed by a 10ms wait, so seems fairly safe.
Tested on ayres and byron (2x2 boxes), though only by building and then running "hello".