« stream_wrapper_unregister
Introducción »
PHP Manual
Otras extensiones básicas
Swoole
Swoole
Introducción
Instalación/Configuración
Instalación
Configuración en tiempo de ejecución
Constantes predefinidas
Funciones de Swoole
swoole_async_dns_lookup
— Busca de manera asíncrona y no bloqueante la dirección IP de un host
swoole_async_read
— Lee un flujo de fichero de manera asíncrona
swoole_async_readfile
— Lee un fichero de manera asíncrona
swoole_async_set
— Actualiza las opciones de E/S asíncronas
swoole_async_write
— Escribe datos en un flujo de fichero de manera asíncrona
swoole_async_writefile
— Escribe datos en un fichero de manera asíncrona
swoole_clear_error
— Elimina los errores en el socket o el último código de error
swoole_client_select
— Devuelve la descripción del fichero listo para ser leído/escrito o un error
swoole_cpu_num
— Devuelve el número de CPU
swoole_errno
— Devuelve el código de error de la última llamada al sistema
swoole_error_log
— Escribe los mensajes de error en el registro
swoole_event_add
— Añade una nueva función de retrollamada de un socket en el EventLoop
swoole_event_defer
— Añade una retrollamada a la próxima iteración del bucle de eventos
swoole_event_del
— Elimina todas las funciones de retrollamada de eventos de un socket
swoole_event_exit
— Sale del bucle de eventos, disponible únicamente en el lado-cliente
swoole_event_set
— Actualiza las funciones de retrollamada de eventos de un socket
swoole_event_wait
— Inicia el bucle de eventos
swoole_event_write
— Escribe datos en un socket
swoole_get_local_ip
— Devuelve las direcciones IP IPv4 de cada NIC en la máquina
swoole_last_error
— Devuelve el último mensaje de error
swoole_load_module
— Carga una extensión swoole
swoole_select
— Selecciona las descripciones de ficheros listas para leer/escribir o en error en el bucle de eventos
swoole_set_process_name
— Define el nombre del proceso
swoole_strerror
— Convierte el Errno en mensajes de error
swoole_timer_after
— Dispara una retrollamada única en el futuro
swoole_timer_exists
— Devuelve si existe una retrollamada de temporizador
swoole_timer_tick
— Dispara una retrollamada de temporizador por intervalo de tiempo
swoole_version
— Devuelve la versión de Swoole
Swoole\Async
— La clase Swoole\Async
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\Atomic
— La clase Swoole\Atomic
Swoole\Atomic::add
— Add a number to the value to the atomic object.
Swoole\Atomic::cmpset
— Compare and set the value of the atomic object.
Swoole\Atomic::__construct
— Construct a swoole atomic object.
Swoole\Atomic::get
— Get the current value of the atomic object.
Swoole\Atomic::set
— Set a new value to the atomic object.
Swoole\Atomic::sub
— Subtract a number to the value of the atomic object.
Swoole\Buffer
— La clase Swoole\Buffer
Swoole\Buffer::append
— Append the string or binary data at the end of the memory buffer and return the new size of memory allocated.
Swoole\Buffer::clear
— Reset the memory buffer.
Swoole\Buffer::__construct
— Fixed size memory blocks allocation.
Swoole\Buffer::__destruct
— Destruct the Swoole memory buffer.
Swoole\Buffer::expand
— Expand the size of memory buffer.
Swoole\Buffer::read
— Read data from the memory buffer based on offset and length.
Swoole\Buffer::recycle
— Release the memory to OS which is not used by the memory buffer.
Swoole\Buffer::substr
— Read data from the memory buffer based on offset and length. Or remove data from the memory buffer.
Swoole\Buffer::__toString
— Get the string value of the memory buffer.
Swoole\Buffer::write
— Write data to the memory buffer. The memory allocated for the buffer will not be changed.
Swoole\Channel
— La clase Swoole\Channel
Swoole\Channel::__construct
— Construct a Swoole Channel
Swoole\Channel::__destruct
— Destruct a Swoole channel.
Swoole\Channel::pop
— Read and pop data from swoole channel.
Swoole\Channel::push
— Write and push data into Swoole channel.
Swoole\Channel::stats
— Get stats of swoole channel.
Swoole\Client
— La clase Swoole\Client
Swoole\Client::close
— Close the connection established.
Swoole\Client::connect
— Connect to the remote TCP or UDP port.
Swoole\Client::__construct
— Create Swoole sync or async TCP/UDP client, with or without SSL.
Swoole\Client::__destruct
— Destruct the Swoole client.
Swoole\Client::getpeername
— Get the remote socket name of the connection.
Swoole\Client::getsockname
— Get the local socket name of the connection.
Swoole\Client::isConnected
— Check if the connection is established.
Swoole\Client::on
— Add callback functions triggered by events.
Swoole\Client::pause
— Pause receiving data.
Swoole\Client::pipe
— Redirect the data to another file descriptor.
Swoole\Client::recv
— Receive data from the remote socket.
Swoole\Client::resume
— Resume receiving data.
Swoole\Client::send
— Send data to the remote TCP socket.
Swoole\Client::sendfile
— Send file to the remote TCP socket.
Swoole\Client::sendto
— Send data to the remote UDP address.
Swoole\Client::set
— Set the Swoole client parameters before the connection is established.
Swoole\Client::sleep
— Remove the TCP client from system event loop.
Swoole\Client::wakeup
— Add the TCP client back into the system event loop.
Swoole\Connection\Iterator
— La clase Swoole\Connection\Iterator
Swoole\Connection\Iterator::count
— Count connections.
Swoole\Connection\Iterator::current
— Return current connection entry.
Swoole\Connection\Iterator::key
— Return key of the current connection.
Swoole\Connection\Iterator::next
— Move to the next connection.
Swoole\Connection\Iterator::offsetExists
— Check if offset exists.
Swoole\Connection\Iterator::offsetGet
— Offset to retrieve.
Swoole\Connection\Iterator::offsetSet
— Assign a Connection to the specified offset.
Swoole\Connection\Iterator::offsetUnset
— Unset an offset.
Swoole\Connection\Iterator::rewind
— Rewinds iterator
Swoole\Connection\Iterator::valid
— Check if current position is valid.
Swoole\Coroutine
— La clase Swoole\Coroutine
Swoole\Coroutine::call_user_func
— Call a callback given by the first parameter
Swoole\Coroutine::call_user_func_array
— Call a callback with an array of parameters
Swoole\Coroutine::cli_wait
— Description
Swoole\Coroutine::create
— Description
Swoole\Coroutine::getuid
— Description
Swoole\Coroutine::resume
— Description
Swoole\Coroutine::suspend
— Description
Swoole\Event
— La clase Swoole\Event
Swoole\Event::add
— Add new callback functions of a socket into the EventLoop.
Swoole\Event::defer
— Add a callback function to the next event loop.
Swoole\Event::del
— Remove all event callback functions of a socket.
Swoole\Event::exit
— Exit the eventloop, only available at client side.
Swoole\Event::set
— Update the event callback functions of a socket.
Swoole\Event::wait
— Description
Swoole\Event::write
— Write data to the socket.
Swoole\Exception
— La clase Swoole\Exception
Swoole\Http\Client
— La clase Swoole\Http\Client
Swoole\Http\Client::addFile
— Add a file to the post form.
Swoole\Http\Client::close
— Close the http connection.
Swoole\Http\Client::__construct
— Construct the async HTTP client.
Swoole\Http\Client::__destruct
— Destruct the HTTP client.
Swoole\Http\Client::download
— Download a file from the remote server.
Swoole\Http\Client::execute
— Send the HTTP request after setting the parameters.
Swoole\Http\Client::get
— Send GET http request to the remote server.
Swoole\Http\Client::isConnected
— Check if the HTTP connection is connected.
Swoole\Http\Client::on
— Register callback function by event name.
Swoole\Http\Client::post
— Send POST http request to the remote server.
Swoole\Http\Client::push
— Push data to websocket client.
Swoole\Http\Client::set
— Update the HTTP client parameters.
Swoole\Http\Client::setCookies
— Set the http request cookies.
Swoole\Http\Client::setData
— Set the HTTP request body data.
Swoole\Http\Client::setHeaders
— Set the HTTP request headers.
Swoole\Http\Client::setMethod
— Set the HTTP request method.
Swoole\Http\Client::upgrade
— Upgrade to websocket protocol.
Swoole\Http\Request
— La clase Swoole\Http\Request
Swoole\Http\Request::__destruct
— Destruct the HTTP request.
Swoole\Http\Request::rawcontent
— Get the raw HTTP POST body.
Swoole\Http\Response
— La clase Swoole\Http\Response
Swoole\Http\Response::cookie
— Set the cookies of the HTTP response.
Swoole\Http\Response::__destruct
— Destruct the HTTP response.
Swoole\Http\Response::end
— Send data for the HTTP request and finish the response.
Swoole\Http\Response::gzip
— Enable the gzip of response content.
Swoole\Http\Response::header
— Set the HTTP response headers.
Swoole\Http\Response::initHeader
— Init the HTTP response header.
Swoole\Http\Response::rawcookie
— Set the raw cookies to the HTTP response.
Swoole\Http\Response::sendfile
— Send file through the HTTP response.
Swoole\Http\Response::status
— Set the status code of the HTTP response.
Swoole\Http\Response::write
— Append HTTP body content to the HTTP response.
Swoole\Http\Server
— La clase Swoole\Http\Server
Swoole\Http\Server::on
— Bind callback function to HTTP server by event name.
Swoole\Http\Server::start
— Start the swoole http server.
Swoole\Lock
— La clase Swoole\Lock
Swoole\Lock::__construct
— Construct a memory lock.
Swoole\Lock::__destruct
— Destroy a Swoole memory lock.
Swoole\Lock::lock
— Try to acquire the lock. It will block if the lock is not available.
Swoole\Lock::lock_read
— Lock a read-write lock for reading.
Swoole\Lock::trylock
— Try to acquire the lock and return straight away even the lock is not available.
Swoole\Lock::trylock_read
— Try to lock a read-write lock for reading and return straight away even the lock is not available.
Swoole\Lock::unlock
— Release the lock.
Swoole\Mmap
— La clase Swoole\Mmap
Swoole\Mmap::open
— Map a file into memory and return the stream resource which can be used by PHP stream operations.
Swoole\MySQL
— La clase Swoole\MySQL
Swoole\MySQL::close
— Close the async MySQL connection.
Swoole\MySQL::connect
— Connect to the remote MySQL server.
Swoole\MySQL::__construct
— Construct an async MySQL client.
Swoole\MySQL::__destruct
— Destroy the async MySQL client.
Swoole\MySQL::getBuffer
— Description
Swoole\MySQL::on
— Register callback function based on event name.
Swoole\MySQL::query
— Run the SQL query.
Swoole\MySQL\Exception
— La clase Swoole\MySQL\Exception
Swoole\Process
— La clase Swoole\Process
Swoole\Process::alarm
— High precision timer which triggers signal with fixed interval.
Swoole\Process::close
— Close the pipe to the child process.
Swoole\Process::__construct
— Construct a process.
Swoole\Process::daemon
— Change the process to be a daemon process.
Swoole\Process::__destruct
— Destroy the process.
Swoole\Process::exec
— Execute system commands.
Swoole\Process::exit
— Stop the child processes.
Swoole\Process::freeQueue
— Destroy the message queue created by swoole_process::useQueue.
Swoole\Process::kill
— Send signal to the child process.
Swoole\Process::name
— Set name of the process.
Swoole\Process::pop
— Read and pop data from the message queue.
Swoole\Process::push
— Write and push data into the message queue.
Swoole\Process::read
— Read data sending to the process.
Swoole\Process::signal
— Send signal to the child processes.
Swoole\Process::start
— Start the process.
Swoole\Process::statQueue
— Get the stats of the message queue used as the communication method between processes.
Swoole\Process::useQueue
— Create a message queue as the communication method between the parent process and child processes.
Swoole\Process::wait
— Wait for the events of child processes.
Swoole\Process::write
— Write data into the pipe and communicate with the parent process or child processes.
Swoole\Redis\Server
— La clase Swoole\Redis\Server
Swoole\Redis\Server::format
— Description
Swoole\Redis\Server::setHandler
— Description
Swoole\Redis\Server::start
— Description
Swoole\Serialize
— La clase Swoole\Serialize
Swoole\Serialize::pack
— Serialize the data.
Swoole\Serialize::unpack
— Unserialize the data.
Swoole\Server
— La clase Swoole\Server
Swoole\Server::addlistener
— Add a new listener to the server.
Swoole\Server::addProcess
— Add a user defined swoole_process to the server.
Swoole\Server::after
— Trigger a callback function after a period of time.
Swoole\Server::bind
— Bind the connection to a user defined user ID.
Swoole\Server::clearTimer
— Stop and destroy a timer.
Swoole\Server::close
— Close a connection to the client.
Swoole\Server::confirm
— Check status of the connection.
Swoole\Server::connection_info
— Get the connection info by file description.
Swoole\Server::connection_list
— Get all of the established connections.
Swoole\Server::__construct
— Construct a Swoole server.
Swoole\Server::defer
— Delay execution of the callback function at the end of current EventLoop.
Swoole\Server::exist
— Check if the connection is existed.
Swoole\Server::finish
— Used in task process for sending result to the worker process when the task is finished.
Swoole\Server::getClientInfo
— Get the connection info by file description.
Swoole\Server::getClientList
— Get all of the established connections.
Swoole\Server::getLastError
— Get the error code of the most recent error.
Swoole\Server::heartbeat
— Check all the connections on the server.
Swoole\Server::listen
— Listen on the given IP and port, socket type.
Swoole\Server::on
— Register a callback function by event name.
Swoole\Server::pause
— Stop receiving data from the connection.
Swoole\Server::protect
— Set the connection to be protected mode.
Swoole\Server::reload
— Restart all the worker process.
Swoole\Server::resume
— Start receiving data from the connection.
Swoole\Server::send
— Send data to the client.
Swoole\Server::sendfile
— Send file to the connection.
Swoole\Server::sendMessage
— Send message to worker processes by ID.
Swoole\Server::sendto
— Send data to the remote UDP address.
Swoole\Server::sendwait
— Send data to the remote socket in the blocking way.
Swoole\Server::set
— Set the runtime settings of the swoole server.
Swoole\Server::shutdown
— Shutdown the master server process, this function can be called in worker processes.
Swoole\Server::start
— Start the Swoole server.
Swoole\Server::stats
— Get the stats of the Swoole server.
Swoole\Server::stop
— Stop the Swoole server.
Swoole\Server::task
— Send data to the task worker processes.
Swoole\Server::taskwait
— Send data to the task worker processes in blocking way.
Swoole\Server::taskWaitMulti
— Execute multiple tasks concurrently.
Swoole\Server::tick
— Repeats a given function at every given time-interval.
Swoole\Table
— La clase Swoole\Table
Swoole\Table::column
— Set the data type and size of the columns.
Swoole\Table::__construct
— Construct a Swoole memory table with fixed size.
Swoole\Table::count
— Count the rows in the table, or count all the elements in the table if $mode = 1.
Swoole\Table::create
— Create the swoole memory table.
Swoole\Table::current
— Get the current row.
Swoole\Table::decr
— Decrement the value in the Swoole table by $row_key and $column_key.
Swoole\Table::del
— Delete a row in the Swoole table by $row_key.
Swoole\Table::destroy
— Destroy the Swoole table.
Swoole\Table::exist
— Check if a row is existed by $row_key.
Swoole\Table::get
— Get the value in the Swoole table by $row_key and $column_key.
Swoole\Table::incr
— Increment the value by $row_key and $column_key.
Swoole\Table::key
— Get the key of current row.
Swoole\Table::next
— Iterator the next row.
Swoole\Table::rewind
— Rewind the iterator.
Swoole\Table::set
— Update a row of the table by $row_key.
Swoole\Table::valid
— Check if the current row is valid.
Swoole\Timer
— La clase Swoole\Timer
Swoole\Timer::after
— Trigger a callback function after a period of time.
Swoole\Timer::clear
— Delete a timer by timer ID.
Swoole\Timer::exists
— Check if a timer is existed.
Swoole\Timer::tick
— Repeats a given function at every given time-interval.
Swoole\WebSocket\Frame
— La clase Swoole\WebSocket\Frame
Swoole\WebSocket\Server
— La clase Swoole\WebSocket\Server
Swoole\WebSocket\Server::exist
— Check if the file descriptor exists.
Swoole\WebSocket\Server::on
— Register event callback function
Swoole\WebSocket\Server::pack
— Get a pack of binary data to send in a single frame.
Swoole\WebSocket\Server::push
— Push data to the remote client.
Swoole\WebSocket\Server::unpack
— Unpack the binary data received from the client.