Jan, I think I figured out the send error.
With RTNET I cannot receive and send on the same socket. So I cannot with RTNET do the follow that works with Linux: 1. Socket 2. SetSocketOpts 3. Bind 4. Listen 5. Accept 6. Recv 7. Send 8. close ------ I can however with RTNET do the following: 1. Socket 2. SetSocketOpts 3. Bind 4. Listen 5. Accept 6. Recv 7. Close ------ 8. Socket 9. SetSocketOpts 10. Bind 11. Connect 12. Send 13. Close The second seemed to work. Does this makes sense to you? Glen On 2/8/11 9:49 AM, "Jan Kiszka" <[email protected]> wrote: > On 2011-02-08 15:27, Glen Wernersbach wrote: >> Jan, >> >> The project I am trying to make real time is: >> http://sourceforge.net/projects/opener/ >> >> It is hard to give a test case because my other side of this is an Allen > > I'm primarily interested in the connection setup pattern which should be > extractable into a set of two simple test applications. > >> Bradley controller. This project does work in standard Linux but then I have >> to deal with OS latencies from the card to my real time program. >> >> Here is my current thought. The code as written in your example works. If I >> run accept() before select, accept() always returns the same file descriptor >> as was put it. Is this a a limitation of RTNET? > > Yes, see Documentation/README.tcp. > >> >> Also, it appear that select() without accept() and you can read() >> successfully. > > Are you implementing a server or a client? A server without accept would > be weird, and a client with it just as well. > >> >> I can probably work around the above. > > Wrong approach, likely doomed to blow up at a different end later on. > >> >> Now I need to focus on why Send or Write are "oops"ing. > > If you don't post it, you will have to parse it on your own... > >> >> The only difference between my code and your example is that I am not >> setting the same socket options SO_KEEPALIVE and SO_SNDTIMEO. I will try >> these this mourning. >> >> 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. > >> >> I will let you know. >> >> Glen >> >> P.S. At least now I know I can go back to RTAI if I want. The rest of our >> project works in RTAI. > > OTOH, analysis is easier elsewhere. > > Jan > -- Glen Wernersbach President & CTO Jetsoft Development Co. 629 Old St Rt. 74 Suite 210 Cincinnati, Oh 45244 Custom Programming Web Site: www.jetsoftdev.com Retail Products Web Site: www.scanhelp.com Phone: 513-528-6660 Fax: 513-528-3470 ---- "Support Dyslexia Research" ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ RTnet-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rtnet-developers

