I have created a TCP client on an EK-TM4C1294XL board. I can connect to my server, and receive data just fine, but I can't send data. Here is the code I am using to send data:
p_pcb = tcp_new();
returnError = tcp_bind(p_pcb, IP_ADDR_ANY, LOCAL_PORT);
returnError = tcp_connect(p_pcb, &server, REMOTE_PORT, Connected);
tcp_recv(p_pcb, Receive);
tcp_sent(p_pcb, Send);
error = tcp_write(p_pcb, sendBuffer, sendBufferSize, TCP_WRITE_FLAG_COPY); //This fails with error code -1 (out of memory).
if (ERR_OK == error)
{
tcp_output(p_pcb);
}
I tired increases the heap size in the project, but that didn't help. I can't even send 1 byte.
Can anyone tell me why I am getting an out of memory error?