|
With non-blocking sockets, it's possible (even likely) that you'll do a recv() and get back zero bytes. With blocking sockets, however, the system will not return from the call to recv until there is actually data to read. In fact, that's the difference between blocking & non-blocking. non-blocking always returns immediately, it never waits for data. so if there's currently data in the receive buffer, it'll return it, otherwise it returns nothing. Blocking, on the other hand, will "block" (wait) on the recv() call until data appears. Oh, and any time I mention "recv()" the same is also true for "read()". Just in case that comes up again today :) On Mon, 22 Apr 2002, Bartell, Aaron L. (TC) wrote: > > If I connect to the IBM HTTP server (Original) via a socket program is it > possible for it to pass back to me zero (0) bytes on the first read if the > network traffic is too high and then above zero values for consecutive > reads? >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.