Re: [RTnet-developers] Ethernet IP
Brought to you by:
bet-frogger,
kiszka
|
From: Anders B. <and...@co...> - 2011-02-08 15:52:32
|
On 02/08/2011 04:03 PM, Jan Kiszka wrote: > On 2011-02-08 16:00, Anders Blomdell wrote: >>>> The only other reason this could be "oops"ing is that I am reading and >>>> writing on the same socket and your example does not. >>> >>> We do in a less trivial application in the field. No complains from my >>> colleagues so far. >> With raw sockets I have problems reading and writing from/to the same socket >> when done from different threads (on my todo list to track this down some time >> in the future), might this be the same problem? > > You mean one thread reads and another writes? Or both mixed? What kind of > problems? At least with one thread reading and one writing. Some errno which I cant exctly recall (9x, something, might have been EADDRINUSE, but I'm not sure). My workaround was to read from the socket with a timeout, that way I was able to do everything in one thread (yes, I know it's not a long term solution). /Anders -- Anders Blomdell Email: and...@co... Department of Automatic Control Lund University Phone: +46 46 222 4625 P.O. Box 118 Fax: +46 46 138118 SE-221 00 Lund, Sweden |