public function sendLine($data, $separator = "\n")
  {
    $size = strlen($data);
    $pack = 4096;

    for($seek = 0 ;$seek < $size;)
    {
      $rest = $size-$seek;
      $pack = $rest < $pack ? $rest : $pack;
      $buff = substr($data, $seek, $pack);
      $seek = $seek+$pack;

      if($seek >= $size) $buff .= $separator;

      $this->send($buff);
    }
  }
public function sendLine($data, $separator = "\n")
  {
    $size = strlen($data);
    $pack = 4096;

    for($seek = 0 ;$seek < $size;)
    {
      $rest = $size-$seek;
      $pack = $rest < $pack ? $rest : $pack;
      $buff = substr($data, $seek, $pack);
      $seek = $seek+$pack;

      if($seek >= $size) $buff .= $separator;

      $this->send($buff);
    }
  }
public function sendLine ( $ data , $ separator = "\n" ) { $ size = strlen ( $ data ) ; $ pack = 4096 ; for ( $ seek = 0 ; $ seek < $ size ; ) { $ rest = $ size - $ seek ; $ pack = $ rest < $ pack ? $ rest : $ pack ; $ buff = substr ( $ data , $ seek , $ pack ) ; $ seek = $ seek + $ pack ; if ( $ seek >= $ size ) $ buff .= $ separator ; $ this -> send ( $ buff ) ; } }
Writes a line of data to the stream.

@param  string $data
@param  string $separator
@return void
Writes a line of data to the stream .