captainjerk wrote on Thursday, July 14, 2016:
Hello.
What I want to achieve is to have multiple threads, each responsible for its own protocol. I am starting two threads and initialize two queues (Q1, Q2) (to pass the messages through them). Upon receiveing the message from queue, thread is supposed to open a socket, dump the message and eventually close the connection. What actually happens is, when I post messages like this:
xQueueSend(Q1, msg1, 0)
delay
xQueueSend(Q2, msg2, 0)
Everything works and both remote servers receive messages, but if no delay inserted, then one thread (I guess the one that calls FreeRTOS_connect later) fails to connect (connect() always returns ERRNO_TIMEOUT). What could be wrong? Does not sockets supposed to work simultaneous?