diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcoopgamma.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c index c4f13ab..b72e856 100644 --- a/src/libcoopgamma.c +++ b/src/libcoopgamma.c @@ -1484,6 +1484,14 @@ int libcoopgamma_flush(libcoopgamma_context_t* restrict ctx) return -1; continue; } + +#ifdef DEBUG_MODE + fprintf(stderr, "\033[31m"); + fwrite(ctx->outbound + ctx->outbound_tail, (size_t)sent, 1, stderr); + fprintf(stderr, "\033[m"); + fflush(stderr); +#endif + ctx->outbound_tail += (size_t)sent; } @@ -1551,6 +1559,14 @@ int libcoopgamma_synchronise(libcoopgamma_context_t* restrict ctx, errno = ECONNRESET; return -1; } + +#ifdef DEBUG_MODE + fprintf(stderr, "\033[32m"); + fwrite(ctx->inbound + ctx->inbound_head, (size_t)got, 1, stderr); + fprintf(stderr, "\033[m"); + fflush(stderr); +#endif + ctx->inbound_head += (size_t)got; skip_recv: |