[comp.realtime] Socket communication under VxWorks

hmp@cive.ri.cmu.edu (Henning Pangels) (02/28/90)

OK, here's my VxWorks question of the day:

I'm using a TCP/IP socket (AF_INET, SOCK_STREAM) to transmit messages
between processors on the backplane. Unfortunately, it appears that
for some reason, the last byte sent is not received at the other end.
That is, send() returns 16 (I'm sending 4 ints), and recv() is returning
15. All 15 bytes actually transmitted do arrive correctly, but the last
one is lost. Has anyone else experienced this? 

-- 
Henning Pangels                                   Field Robotics Center
ARPAnet/Internet: hmp@cive.ri.cmu.edu             Robotics Institute
(412) 268-7088                                    Carnegie-Mellon University

jnixon@andrew.ATL.GE.COM (John F Nixon) (02/28/90)

hmp@cive.ri.cmu.edu (Henning Pangels) writes:
>I'm using a TCP/IP socket (AF_INET, SOCK_STREAM) to transmit messages
>between processors on the backplane. Unfortunately, it appears that
>for some reason, the last byte sent is not received at the other end.

Do you do only a single read for it?  SOCK_STREAM does not guarantee that
a single write will show up at the other end in one piece.  You might try
waiting a bit and reading again, or MSG_PEEKing till all the data is there.


--
----
jnixon@atl.ge.com                    ...steinmetz!atl.decnet!jnxion