[Virtualacorn-list] A peculiar problem with XSocket_Read

Jeremy Nicoll - virtualacorn jn.ml.vac.83 at wingsandbeaks.org.uk
Sun Sep 7 20:15:06 BST 2008


I've a personal copy of !AntiSpam which gets an unexpected (and undocumented
under RO) error 7 from XSocket_Read.  The code is:


SYS XSocket_Read%,sock%,buf%+buf_end%,max_buf%-buf_end% TO r0%;flags%

IF r0% = 0 THEN
 PROClog1("APP","! socket read: other end set eof, so close skt")
 PROCskt_close_socket                   : REM added 2007JAN02
 PROCupdate_stateflag_and_displaytexts(sta_NEXT_MBOX%,FALSE)
 ENDPROC
ENDIF

IF (flags% AND 1) THEN
 rg0en% = r0%!0
 errno% = (r0%!0) AND &7F: REM Iyonix compliant
 PROClog1("APP","! skt read error")

 CASE errno% OF
  WHEN EBADF,ENOTCONN
   PROCskt_close_socket                   : REM added 2007JAN02
   PROCupdate_stateflag_and_displaytexts(sta_NEXT_MBOX%,FALSE)

  WHEN EWOULDBLOCK
   REM Do nothing.
   REM ENDPROC

  WHEN 7
   REM There's been a rash of these in mid-August 2008
   PROClog1("APP","...another socket read error 7")              


When I first started running this code under VRPC I had to make various
changes (unfortunately I can't quite remember the details of this) because
the way that VRPC handles sockets is clearly not the same as the way that RO
does so natively.

I presume that VRPC has a socket-support module which passes socket requests
to the underlying Windows socket services.  There must be a subtle
difference between the way RO expects this to work and the way that Windows
does.

Anyway, the code above quite often gets errno% values of 7.  I have no idea
what that is meant to mean, and therefore don't know how to handle it
properly.  Is there any documentation of the VRPC socket support?

-- 
Jeremy C B Nicoll - my opinions are my own.





More information about the Virtualacorn-list mailing list