Tool/software: TI-RTOS
I am working on a design that requires TPC/IP server support. In the past I've opened a listener socket and once a client connects, spawn off a receiver thread and a transmit thread sharing the connected socket. I'm trying to do this new with a sys/bios Task pair and it is not working. I use DaemonNew to setup the server. On a client connection the call back I pass to DaemonNew is call and my intent was to use that has the receive thread in an infinite loop blocking on recvnc() but before doing that, I Task-create() my transmit thread.
When I queue something to the transmit tread after receiving a request on the recv thread, my client gets only a single byte, my application shows a socket error and then shortly there after crashes. I've check under CCS debug my the socket number on the transmit side is correct, the byte count to send is correct and the send buffer pointer is correct. All data is protected with critical sections, the socket itself is not.
Is this approach flawed under sys/bios?
(SYS/BIOS 6.46, XDCtools 3.32, NDK 2.25)