From 8dca65bcd4478cc20de35b6eba1e4f2231ced6b7 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Tue, 27 Jun 2017 18:30:28 +0200 Subject: [PATCH] Move socket classes into an internal namespace --- lib/BasicResolver.php | 5 ++++- lib/{ => Internal}/Socket.php | 4 +++- lib/{ => Internal}/TcpSocket.php | 4 +++- lib/{ => Internal}/UdpSocket.php | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) rename lib/{ => Internal}/Socket.php (98%) rename lib/{ => Internal}/TcpSocket.php (97%) rename lib/{ => Internal}/UdpSocket.php (96%) diff --git a/lib/BasicResolver.php b/lib/BasicResolver.php index d4968d8..a3773f4 100644 --- a/lib/BasicResolver.php +++ b/lib/BasicResolver.php @@ -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]); } diff --git a/lib/Socket.php b/lib/Internal/Socket.php similarity index 98% rename from lib/Socket.php rename to lib/Internal/Socket.php index 719e4d5..6bc4afc 100644 --- a/lib/Socket.php +++ b/lib/Internal/Socket.php @@ -1,12 +1,14 @@