Download the PHP package tourze/workerman-dns-client without Composer
On this page you can find all versions of the php package tourze/workerman-dns-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/workerman-dns-client
More information about tourze/workerman-dns-client
Files in tourze/workerman-dns-client
Package workerman-dns-client
Short Description DNS Query Client in Workerman
License MIT
Informations about the package workerman-dns-client
Workerman DNS Client
中文
A high-performance asynchronous DNS query client specifically designed for the Workerman environment, providing non-blocking domain name resolution to IP addresses.
Features
- Asynchronous DNS Resolution - Non-blocking DNS queries using Workerman's event loop
- React DNS Protocol Support - Built on the reliable React DNS library
- Smart Caching - Configurable result caching using Symfony Cache components
- Modular Architecture - Fully testable design with dependency injection
- Interface-based Design - Loose coupling allows easy customization and testing
- Production Ready - Comprehensive error handling and logging support
Installation
Requirements
- PHP 8.1 or higher
- ext-filter
- workerman/workerman ^5.1
- react/dns ^1.13
- symfony/cache ^7.3
Quick Start
Basic Usage
Advanced Configuration
You can customize DNS server settings and timeouts:
Architecture
Component Overview
The library follows a modular architecture with clear separation of concerns:
DnsConfig- Immutable configuration object storing DNS query parametersDnsCacheInterface- Caching layer for DNS resolution resultsUdpConnectionFactoryInterface- Factory for creating UDP connectionsDnsProtocolHandlerInterface- DNS protocol operations and message handlingTimerInterface- Timeout management for queriesLoggerInterface- Logging and debugging support
Custom Implementation
For advanced use cases, you can provide custom implementations:
Testing
Run the test suite:
The library includes comprehensive unit tests covering all components and integration scenarios.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
The MIT License (MIT). Please see License File for more information.
All versions of workerman-dns-client with dependencies
react/dns Version ^1.13
symfony/cache Version ^7.3
workerman/workerman Version ^5.1