note 28792 rejected from function.socket-read by victor
| From: | victor@php.net | Date: | Fri, 24 Jan 2003 07:44:47 +0000 |
| Subject: | note 28792 rejected from function.socket-read by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42679@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?