Re: Solaris 8 network programming problem





On Nov 14, 1:10 pm, "Maxim Yegorushkin" <maxim.yegorush...@xxxxxxxxx>
wrote:
sansp00 wrote:
On Nov 14, 5:21 am, Casper H.S. Dik <Casper....@xxxxxxx> wrote:
James Antill <james-netn...@xxxxxxx> writes:
read/recv returning 0 on a socket means the other end has shutdown(), and
so there is no more data.Or a 0 length message was received (non-SOCK_STREAM transports only)

I am on SOCK_STREAM transports, so Im still a bit in the dark as to why
Im getting data after a while on sockets that issued recv with 0 bytes.That's rather unlikely. Is it recv() or ioctl(FIONREAD) what returns
you 0?

It's the recv in that specific case ... We rewrote some code to fix the
'broken' model we had.
We did try out the a hybrid of the code with the recv and ioctl to see
if they behaved in the same way ...
Both behaved in the same matter when the situation occured. So I am
back to square one :(
Thanks
Patrick S.

.



Relevant Pages

  • Re: BSD sockets: recv with MSG_WAITALL should return EWOULDBLOCK?
    ... (I am not convinced it is much use for blocking sockets ... many bytes as the size argument to recv() or to close the connection ... And this sounds like 'if you are using a buffer size that doesn't ... Another frame arrives and more data is queued to the socket buffer. ...
    (comp.unix.programmer)
  • Re: Sockets and Notification
    ... I use synchronous sockets exclusively (i.e. native WinSock2 stuff with send ... and recv) - no MFC CAsyncSocket stuff. ... If you want to wait for a predetermined time on a recv call (note - the ... > Anyway, Lets say I want to call a method in the communication class, tell ...
    (microsoft.public.vc.mfc)
  • Re: recv() hangs until SIGCHLD ?
    ... We run a multithread application which is using pthreads and sockets. ... one threads are hanging in recv(). ... when attaching GDB to our locked thread it seems that even when ... exit and the thread is correctly unlocked. ...
    (Linux-Kernel)
  • unix(7) and MSG_TRUNC semantics
    ... I use unix domain datagram sockets. ... The man page recv(2) tells me about the flags argument to a recv ... message truncation due to insufficient buffer size. ...
    (Linux-Kernel)
  • Re: Connection broken on recv() function
    ... It doesn't explicitly detect broken connections (other than by the absence of incoming data) but I've used selectin the past to make sure it's worth calling recv() and not have it block. ... I've seen a system where sockets couldn't be set to be non-blocking, for example, and a universal receive timeout on all sockets is not always desirable. ... with the error code WSAECONNRESET. ...
    (microsoft.public.win32.programmer.kernel)