SOCK_STREAM and EPOLLET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to epoll(7):
       Q9  Do I need to continuously read/write a file descriptor until
           EAGAIN when using the EPOLLET flag (edge-triggered behavior) ?

       A9  For  stream-oriented files (e.g., pipe, FIFO, stream socket),
           the condition that the read/write I/O space is exhausted can
           also be detected by checking the amount of data read from /
           written to the target file descriptor.

However, if the remote end of a socket(PF_INET6, SOCK_STREAM,
IPPROTO_SCTP) is making multiple send() calls with 1 byte of data (and
has NODELAY enabled), then a recv() call only returns 1 byte of data at
a time even if there is more data available.

I'd expect a stream socket to return all the available data. Either the
behaviour of recv() is wrong or the advice in epoll(7) is incorrect for
SCTP sockets.

-- 
Simon Arlott
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux