Changeset 8269 for temp


Ignore:
Timestamp:
2006/11/13 14:43:10 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/data/module/Net/Socket.php

    r6916 r8269  
    448448        $line = ''; 
    449449        $timeout = time() + $this->timeout; 
     450         
     451        $fp = $this->fp; 
     452        while (($c =@fgets($fp, $this->lineLength))!==false && (!$this->timeout || time() < $timeout)) { 
     453            $line .= $c; 
     454            if (substr($line, -1) == "\n") { 
     455                return rtrim($line, "\r\n"); 
     456            } 
     457            sfprintr("Socket"); 
     458            sfprintr($line); 
     459        } 
     460         
     461         
     462        /* 
    450463        while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) { 
    451464            $line .= @fgets($this->fp, $this->lineLength); 
     
    454467            } 
    455468        } 
     469        */ 
    456470        return $line; 
    457471    } 
    458  
     472     
    459473    /** 
    460474     * Read until the socket closes, or until there is no more data in 
Note: See TracChangeset for help on using the changeset viewer.