Example #1
0
 /**
  * @param resource $socket
  * @param string $address
  * @param string $scheme
  *
  * @return QuarkClient
  */
 public static function ForServer($socket, $address, $scheme)
 {
     $client = new self();
     $client->Socket($socket);
     $client->Blocking(false);
     $client->Timeout(0);
     $uri = QuarkURI::FromURI($address);
     $uri->scheme = $scheme;
     $client->URI($uri);
     return $client;
 }