From 5851f2ff3ecc1ff3ec51dfe48a058e9c6a475556 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 13 May 2012 19:47:02 -0400 Subject: [PATCH] add comments. --- mselect.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mselect.c b/mselect.c index 012198e..8dd6267 100644 --- a/mselect.c +++ b/mselect.c @@ -85,7 +85,14 @@ boolean readable(Entry *e) if (state == TCPSCLOSED || state > TCPSESTABLISHED) return true; - + /* + * The receive low-water mark is the amount of data that must be + * in the socket receive buffer for select to return "readable." + * It defaults to 1 for TCP, UDP, and SCTP sockets. + * + * - UNIX Network Programming Volume 1, Third Edition, page 169 + * + */ if (e->sr.srRcvQueued >= e->_RCVLOWAT) return true;