[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Networking question
- Date: Fri, 2 May 2008 22:35:33 +0300
- From: leonp at plris.com (Leon Pollak)
- Subject: Networking question
Hello, all.
I have one TCP socket which is used simultaneously by 10 tasks (according to
my checks in the internet, this is allowed, yes?).
Tasks 1-9 are looping on writing something with about 20Hz frequency
(send(so,...) then 20ms sleep), task 10 (which opened the socket) does
read(so...), which has a packet once in half an hour.
The problem occurs in about 70% of the cases when on the other side (PC with
Windows XP) user cancels the application.
In 30% of good cases, all send(so...) finishes with -1 and read(so,...) as
well.
Very nice, except that there are other 70%, when the "read" operation ends
with -1, while almost all send's do not (some times one does).
When I dump out the tasks states in the bad case, I see that all these are
waiting for events (which is not my case, as I do only rtems_task_wake...).
Can somebody of network gurus explain me my error?
Thanks ahead.
--
Leon