You are here: fgets not blocking « PHP Programming Language « IT news, forums, messages
fgets not blocking

Posted by yawnmoth on 10/07/91 11:54

Say you open a socket connection with fsockopen. Normally, subsequent
calls to fgets are going to block until input is ready. Unless, of
course, socket_set_blocking is used to disable blocking (which I'm not
doing).

Unfortunately, this does not seem to always be the case. I still, on
occasion, get empty strings from fgets. Since feof returns false,
there's still input left. Yet fgets isn't giving it to me, as it
should be.

Now, I am aware that fgets stops when a new line character is
encountered, but that new line character is supposed to,
never-the-less, be included in the string that fgets returns. In my
case, it isn't. I'm just getting empty strings. And I don't see why.

Any ideas?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация