Increase the size of the number of bytes sent from uint16_t to uint32_t in...
Increase the size of the number of bytes sent from uint16_t to uint32_t in order to avoid TCP errors with long sessions. For exmple: int hello_main(int argc, char *argv[]) { uint32_t i; for(i = 0; i < 65536; i++) { printf("Hello, World!!\n"); } printf("press any key!!\n"); if (getchar()=='t') return 0; else return 1; } When ran in a Telnet session, the "press any key" is not displayed because the tcp session closed unexpectedly with: tcp_input: ERROR: conn->sndseq xx, conn->unacked xx" This is fixed by increasing the width of conn->sent to 32-bits to prevent overflow. From Rony XLN
parent
c7a02488
Please register or sign in to comment