Mail Archives: djgpp/1997/02/06/18:09:55
Paul Dixon wrote:
>I have a bizarre problem - on my PC (P90 with a D-Link 16 bit ISA >netcard) I
>get tx rates of 300kB/s inbound, and 250kB/s outwards, but ONLY with
>debugging output to the screen at every tcp write - if I disable these
>printf statements then the tx rate for tcp writes drops by a factor of >20!
>The offending code is horrible cos I have thrown lots of debugging >waiting
>etc in an attempt to fix but to no avail - does anyone have any good >ideas ?
Sounds like your data is getting buffered, but without seeing write_s
and probably the rest of your code, I can't be sure. You should have
better tx rates than that on a 10Mb Ethernet link unless you are on a
very busy network... The screen I/O is probably slowing it down some.
But it sounds like the printfs are causing your socket to get flushed
out... If I have time, I'll take a look at your code.
MST
- Raw text -