while(($line = @fgets($this->socket)) != null) {
$line=trim($line);
if(!empty($line)) {
- if(DEBUG_RAW) echo"[recv] ".$line."\n";
+ echo"[recv] ".$line."\n";
$this->traffic['in'] += strlen($line);
$lines[] = $line;
if(count($lines) >= self::CLIENT_RECV_MAX_LINES) break;
public function send($line, $newline = "\r\n") {
if($this->socket == null) return;
- if(DEBUG_RAW) echo"[send] ".$line."\n";
+ echo"[send] ".$line."\n";
$this->traffic['out'] += strlen($line);
fwrite($this->socket,$line.$newline);
}