mirror of
https://github.com/danog/dns.git
synced 2024-11-26 20:14:51 +01:00
Move socket classes into an internal namespace
This commit is contained in:
parent
bd78869bcd
commit
8dca65bcd4
@ -4,6 +4,9 @@ namespace Amp\Dns;
|
|||||||
|
|
||||||
use Amp\Cache\ArrayCache;
|
use Amp\Cache\ArrayCache;
|
||||||
use Amp\Cache\Cache;
|
use Amp\Cache\Cache;
|
||||||
|
use Amp\Dns\Internal\Socket;
|
||||||
|
use Amp\Dns\Internal\TcpSocket;
|
||||||
|
use Amp\Dns\Internal\UdpSocket;
|
||||||
use Amp\Loop;
|
use Amp\Loop;
|
||||||
use Amp\MultiReasonException;
|
use Amp\MultiReasonException;
|
||||||
use Amp\Promise;
|
use Amp\Promise;
|
||||||
@ -199,7 +202,7 @@ final class BasicResolver implements Resolver {
|
|||||||
unset($this->sockets[$uri]);
|
unset($this->sockets[$uri]);
|
||||||
$socket->close();
|
$socket->close();
|
||||||
|
|
||||||
/** @var \Amp\Dns\Socket $server */
|
/** @var Socket $server */
|
||||||
$i = $attempt % \count($nameservers);
|
$i = $attempt % \count($nameservers);
|
||||||
$socket = yield $this->getSocket($protocol . "://" . $nameservers[$i]);
|
$socket = yield $this->getSocket($protocol . "://" . $nameservers[$i]);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Amp\Dns;
|
namespace Amp\Dns\Internal;
|
||||||
|
|
||||||
use Amp;
|
use Amp;
|
||||||
use Amp\ByteStream\ResourceInputStream;
|
use Amp\ByteStream\ResourceInputStream;
|
||||||
use Amp\ByteStream\ResourceOutputStream;
|
use Amp\ByteStream\ResourceOutputStream;
|
||||||
use Amp\ByteStream\StreamException;
|
use Amp\ByteStream\StreamException;
|
||||||
use Amp\Deferred;
|
use Amp\Deferred;
|
||||||
|
use Amp\Dns\ResolutionException;
|
||||||
|
use Amp\Dns\TimeoutException;
|
||||||
use Amp\Promise;
|
use Amp\Promise;
|
||||||
use LibDNS\Messages\Message;
|
use LibDNS\Messages\Message;
|
||||||
use LibDNS\Messages\MessageFactory;
|
use LibDNS\Messages\MessageFactory;
|
@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Amp\Dns;
|
namespace Amp\Dns\Internal;
|
||||||
|
|
||||||
use Amp;
|
use Amp;
|
||||||
use Amp\Deferred;
|
use Amp\Deferred;
|
||||||
|
use Amp\Dns\ResolutionException;
|
||||||
|
use Amp\Dns\TimeoutException;
|
||||||
use Amp\Loop;
|
use Amp\Loop;
|
||||||
use Amp\Parser\Parser;
|
use Amp\Parser\Parser;
|
||||||
use Amp\Promise;
|
use Amp\Promise;
|
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Amp\Dns;
|
namespace Amp\Dns\Internal;
|
||||||
|
|
||||||
|
use Amp\Dns\ResolutionException;
|
||||||
use Amp\Promise;
|
use Amp\Promise;
|
||||||
use Amp\Success;
|
use Amp\Success;
|
||||||
use LibDNS\Decoder\DecoderFactory;
|
use LibDNS\Decoder\DecoderFactory;
|
Loading…
Reference in New Issue
Block a user