We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
I've been working for a while on a BSD server using KEIL MDK5 latest version 5.21a middleware. I'm using the multitask RTOS RTX in Round Robin mode. I'm using the common sequence task to handle a connection request on the socket:
1. socket 2. bind 3. listen 4. accept 5. send/receive 6. closesocket
My host application executes two kind of get command: the first one with a single connection request and a second one with a multiple connection requests (4 reqs in a single command). When it performs the second one, at the end of multiple send/receive session, I "close" the current socket (case 6), and I go to waiting for a new request connection (case 4). Now, in absence of new pending requests, the "accept" function doesn't block as I expected, but it reopens the previous one. So the next "receive" call fails and it leads to a kind infinite ping/pong behaviour.
I don't understand why the accept function doesn't block, waiting for new connection requests as it is expected using RTX RTOS.
Fabio