i will be sending more patches for this package, but wanted to get this
one out of the way first.  It supports sockets which are sending new-lines
without carriage-returns.  all along i have been thinking i was using the
package incorrectly, or writing bad commands/data to the socket.

thanks,
aaron


*** Socket.php.old      Fri Sep  7 18:19:12 2001
--- Socket.php  Fri Sep  7 19:13:33 2001
***************
*** 291,299 ****
              $timeout = time() + $this->timeout;
              while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
                  $line .= fgets($this->fp, $this->lineLength);
!                 $len = strlen($line);
!                 if ($len >=2 && substr($line, $len-2, 2) == "\r\n")
!                     return substr($line, 0, $len-2);
              }
              return $line;
          }
--- 291,301 ----
              $timeout = time() + $this->timeout;
              while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
                  $line .= fgets($this->fp, $this->lineLength);
!                 if (strlen($line) >= 2 &&
!                     (substr($line, -2) == "\r\n" ||
!                      substr($line, -1) == "\n")) {
!                     return rtrim($line);
!               }
              }
              return $line;
          }


-- 
__________________________________________
PINE 4.33 Mailer - www.washington.edu/pine



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to