1
0
mirror of https://github.com/danog/dns.git synced 2024-11-30 04:29:06 +01:00

Move socket classes into an internal namespace

This commit is contained in:
Niklas Keller 2017-06-27 18:30:28 +02:00
parent bd78869bcd
commit 8dca65bcd4
4 changed files with 12 additions and 4 deletions

View File

@ -4,6 +4,9 @@ namespace Amp\Dns;
use Amp\Cache\ArrayCache;
use Amp\Cache\Cache;
use Amp\Dns\Internal\Socket;
use Amp\Dns\Internal\TcpSocket;
use Amp\Dns\Internal\UdpSocket;
use Amp\Loop;
use Amp\MultiReasonException;
use Amp\Promise;
@ -199,7 +202,7 @@ final class BasicResolver implements Resolver {
unset($this->sockets[$uri]);
$socket->close();
/** @var \Amp\Dns\Socket $server */
/** @var Socket $server */
$i = $attempt % \count($nameservers);
$socket = yield $this->getSocket($protocol . "://" . $nameservers[$i]);
}

View File

@ -1,12 +1,14 @@
<?php
namespace Amp\Dns;
namespace Amp\Dns\Internal;
use Amp;
use Amp\ByteStream\ResourceInputStream;
use Amp\ByteStream\ResourceOutputStream;
use Amp\ByteStream\StreamException;
use Amp\Deferred;
use Amp\Dns\ResolutionException;
use Amp\Dns\TimeoutException;
use Amp\Promise;
use LibDNS\Messages\Message;
use LibDNS\Messages\MessageFactory;

View File

@ -1,9 +1,11 @@
<?php
namespace Amp\Dns;
namespace Amp\Dns\Internal;
use Amp;
use Amp\Deferred;
use Amp\Dns\ResolutionException;
use Amp\Dns\TimeoutException;
use Amp\Loop;
use Amp\Parser\Parser;
use Amp\Promise;

View File

@ -1,7 +1,8 @@
<?php
namespace Amp\Dns;
namespace Amp\Dns\Internal;
use Amp\Dns\ResolutionException;
use Amp\Promise;
use Amp\Success;
use LibDNS\Decoder\DecoderFactory;