Example #1
0
 /**
  * Parse a DNS question record and add it the given response.
  * 
  * @param Response $response
  */
 protected function parseQuestion(Response $response) : \Generator
 {
     $host = (yield from $this->transport->readLabel());
     $type = (yield from $this->transport->readShort());
     $class = (yield from $this->transport->readShort());
     $response->addQuestion($host, $type, $class);
 }