|
From: | address@hidden |
Subject: | Re: [lwip-users] tcp_output doesn't flush |
Date: | Fri, 09 Jan 2015 20:28:10 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
Thiscord wrote
The tcpSendQueue then only hands over the size of the data to send to a dedicated send task. The send task looks like this: uint16 payloadLength; while(1) { xQueueReceive( tcpSendQueue, &payloadLength, portMAX_DELAY ); tcp_write(cmd.pcb, txBuffer, payloadLength, 0); xSemaphoreGive(tcpSendProtection); tcp_output(cmd.pcb); }
The simple answer is what you're doing is wrong. You must not call tcp_* functions from any other thread than the tcpip_thread. You might want to use the netconn API to keep your threading setup.
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |