note 28792 added to function.socket-read

From: Date: Fri, 24 Jan 2003 02:00:09 +0000
Subject: note 28792 added to function.socket-read
Groups: php.notes 
Request: Send a blank email to php-notes+get-42669@lists.php.net to get a copy of this message
I have tried the above examples and looked through the manual and I cannot locate anyone else having this problem.... I am trying to write a very simple daemon and I cannot get my socketread to work with linux telnet. Thgis daemon is a wannabe smtpd of sorts just for background, so I need to be able to get info line by line. while(($buf = socket_read($connection, 500, PHP_NORMAL_READ)) !== FALSE) { //fancy interaction stuff here } If I set the length down to 100, and type 100 characters in linux telnet, it executes the interaction stuff....no matter how many times I hit enter, try to insert \r or \n or \r\n. If I connect using putty on a win32 machine, it reads just fine at line breaks. Same results with php_binary_read Sendmail will read stuff 'line by line' from linux telnet, php socket_read broken? -- http://www.php.net/manual/en/function.socket-read.php http://master.php.net/manage/user-notes.php?action=edit+28792 http://master.php.net/manage/user-notes.php?action=delete+28792 http://master.php.net/manage/user-notes.php?action=reject+28792

« previous php.notes (#42669) next »