printf - Sending single charaters to Telnet -


i have single-threaded program runs on wec2013 device. since device has no display use telnet connection device.

i want show progress indication. purpose added printf statement:

void dotimeconsumingcalculation() {    (auto step = 0; step < 100; ++step)    {       // calculate, takes 10 seconds       crunchnumbers();       // keep user happy       printf(".");    }    printf("\n"); } 

instead of issuing dots during calculation results in complete line sent client when \n sent.

i experiemented fflush(stdout); , setvbuf(0, _ionbf,0); without effect. fprintf(stderr, '.'); gives same result.

but when use printf(".."); 2 dots immediately. not output need.

how can convince c-runtime library send each single character?


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -