Home
My Account
About us
Products
Support Services
Buy online
Downloads
Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
PHP Manual
Swoole
Installing/Configuring
Predefined Constants
Swoole Functions
Swoole\Async
Swoole\Atomic
Swoole\Buffer
Swoole\Channel
Swoole\Client
Swoole\Connection\Iterator
Swoole\Coroutine
Swoole\Coroutine\Lock
Swoole\Event
Swoole\Exception
Swoole\Http\Client
Swoole\Http\Request
Swoole\Http\Response
Swoole\Http\Server
Swoole\Lock
Swoole\Mmap
Swoole\Module
Swoole\MySQL
Swoole\MySQL\Exception
Swoole\Process
Swoole\Redis\Server
Swoole\Runtime
Swoole\Serialize
Swoole\Server
Swoole\Table
Swoole\Timer
Swoole\WebSocket\Frame
Swoole\WebSocket\Server
swoole_version
Swoole\Async::dnsLookup
Swoole
Last updated: Mon, 26 Oct 2026
The Swoole\Async class
(PECL swoole >= 1.9.0)
Introduction
Class synopsis
class
Swoole\Async
{
/* Methods */
public
static
function
dnsLookup
(
string
$hostname
,
callable
$callback
):
void
public
static
function
read
(
string
$filename
,
callable
$callback
,
int
$chunk_size
= ?
,
int
$offset
= ?
):
bool
public
static
function
readFile
(
string
$filename
,
callable
$callback
):
void
public
static
function
set
(
array
$settings
):
void
public
static
function
write
(
string
$filename
,
string
$content
,
int
$offset
= ?
,
callable
$callback
= ?
):
void
public
static
function
writeFile
(
string
$filename
,
string
$content
,
callable
$callback
= ?
,
string
$flags
= ?
):
void
}
Table of Contents
Swoole\Async::dnsLookup
— Async and non-blocking hostname to IP lookup.
Swoole\Async::read
— Read file stream asynchronously.
Swoole\Async::readFile
— Read a file asynchronously.
Swoole\Async::set
— Update the async I/O options.
Swoole\Async::write
— Write data to a file stream asynchronously.
Swoole\Async::writeFile
— Description
swoole_version
Swoole\Async::dnsLookup
Swoole
Last updated: Mon, 26 Oct 2026