76
µTasker general / fnSendBufTCP problem
« on: January 08, 2010, 10:17:19 AM »
In fact fnSendBufTCP allocate space in memory for the buffer with uMalloc which cannot be freed.
My application is a TCP Client connecting to a TCP server.
Each time the connection got problem, it is closed then opened again :
It looks like further fnSendBufTCP calls will consume memory.
Does this means this function could not be used with dynamically created Socket ?
My application is a TCP Client connecting to a TCP server.
Each time the connection got problem, it is closed then opened again :
Code: [Select]
case GIP_OPEN_REQUESTED:
tGIP_TCP_socket = fnTCP_close(GIP_TCP_socket);
fnReleaseTCP_Socket(GIP_TCP_socket); // release existing connection
if ((GIP_TCP_socket = fnGetTCP_Socket(TOS_MINIMISE_DELAY, TCP_NO_TIMEOUT, fnGIPListener)) >= 0) {
ucGIP_RxState = GIP_STATE_OPENED;
} // if
uTaskerStateChange(OWN_TASK, UTASKER_ACTIVATE);
break;
It looks like further fnSendBufTCP calls will consume memory.
Does this means this function could not be used with dynamically created Socket ?