├── .clang-format
├── .editorconfig
├── .gitattributes
├── .gitignore
├── CMakeLists.txt
├── Dockerfile
├── LICENSE
├── Makefile.frag
├── README.md
├── codecov.yml
├── composer.json
├── config.m4
├── docs
├── CHANGELOG.md
├── CODE-STYLE.md
├── CPPLINT.cfg
├── ISSUE.md
├── SUPPORTED.md
├── TESTS.md
├── WORKFLOW-PARAMETERS.md
├── google-style.xml
├── sponsors.md
└── swoole-logo.svg
├── examples
├── atomic
│ ├── long.php
│ ├── test.php
│ └── wait.php
├── client
│ ├── c10k.php
│ ├── get_socket.php
│ ├── long_tcp.php
│ ├── recv_1m.php
│ ├── recv_file.php
│ ├── select.php
│ ├── simple.php
│ ├── sync.php
│ ├── test.txt
│ └── udp_sync.php
├── coroutine
│ ├── backtrace.php
│ ├── before_server_start.php
│ ├── behavior
│ │ ├── do-while.php
│ │ ├── for.php
│ │ ├── foreach.php
│ │ ├── goto.php
│ │ ├── preemptive_timer.php
│ │ ├── tick.php
│ │ ├── while.php
│ │ └── while2.php
│ ├── channel
│ │ └── test.php
│ ├── client_send_yield.php
│ ├── client_send_yield_server.php
│ ├── coro_array_map.php
│ ├── coro_call_user.php
│ ├── coro_channel.php
│ ├── coro_destruct.php
│ ├── coro_destuct.php
│ ├── coro_empty.php
│ ├── coro_gethost.php
│ ├── coro_include.php
│ ├── coro_invoke.php
│ ├── coro_nested.php
│ ├── coro_nested_empty.php
│ ├── coro_serialize.php
│ ├── coro_set_stack_size.php
│ ├── coro_sleep.php
│ ├── coro_stackless.php
│ ├── coro_util.php
│ ├── csp.php
│ ├── deadlock.php
│ ├── defer.php
│ ├── defer_client.php
│ ├── enable_coroutine.php
│ ├── exception
│ │ └── empty.php
│ ├── exec.php
│ ├── exit_in_coroutine.php
│ ├── exit_with_status.php
│ ├── fgets.php
│ ├── fread.php
│ ├── fwrite.php
│ ├── gethostbyname.php
│ ├── http
│ │ ├── server.php
│ │ └── write_func.php
│ ├── http2_client.php
│ ├── http_backend_serv.php
│ ├── http_client.php
│ ├── http_download.php
│ ├── http_server.php
│ ├── httpmulti.php
│ ├── join.php
│ ├── library
│ │ └── base.php
│ ├── list_coroutines.php
│ ├── mysql_chan.php
│ ├── mysql_escape.php
│ ├── mysql_execute_empty.php
│ ├── mysql_prepare.php
│ ├── mysql_prepare_2.php
│ ├── mysql_procedure_exec.php
│ ├── mysql_query.php
│ ├── mysql_unixsocket.php
│ ├── pdo
│ │ └── pdo_persistent.phpt
│ ├── proc_open.php
│ ├── reconnect_test.php
│ ├── redis
│ │ ├── auth.php
│ │ ├── defer.php
│ │ ├── eval.php
│ │ ├── get.php
│ │ ├── multi.php
│ │ ├── pipeline.php
│ │ ├── pub.php
│ │ ├── request.php
│ │ ├── serialize.php
│ │ └── sub.php
│ ├── redis_pool.php
│ ├── redis_subscribe.php
│ ├── scheduler.php
│ ├── select
│ │ ├── 1.php
│ │ ├── 2.php
│ │ ├── 3.php
│ │ ├── 4.php
│ │ ├── 5.php
│ │ ├── 6.php
│ │ ├── 7.php
│ │ ├── 8.php
│ │ ├── 9.php
│ │ ├── poptimeout.php
│ │ └── test.php
│ ├── send_yield.php
│ ├── send_yield_client.php
│ ├── server
│ │ └── tcp.php
│ ├── sleep.php
│ ├── socket
│ │ ├── accept.php
│ │ └── sendto.php
│ ├── stack.php
│ ├── stack
│ │ ├── 1.php
│ │ └── 2.php
│ ├── statvfs.php
│ ├── task_co.php
│ ├── tcp_backend_serv.php
│ ├── tcp_echo.php
│ ├── test.php
│ ├── timer_test.php
│ ├── udp_client.php
│ ├── udp_tcp_timeout.php
│ ├── user_coroutine.php
│ ├── util
│ │ ├── resume001.php
│ │ ├── resume002.php
│ │ └── resume003.php
│ ├── waitgroup.php
│ └── websocket
│ │ ├── client.php
│ │ ├── co_server.php
│ │ └── server.php
├── cpp
│ ├── Makefile
│ ├── co.cc
│ ├── repeat.cc
│ └── test_server.cc
├── curl
│ ├── hook.php
│ ├── multi.php
│ └── server.php
├── dtls
│ ├── client.php
│ └── server.php
├── eof
│ ├── client.php
│ └── server.php
├── event
│ ├── cycle.php
│ ├── inotify.php
│ ├── sockets.php
│ ├── stdin.php
│ ├── stream.php
│ └── test.php
├── http
│ ├── UPPER.TXT
│ ├── client.php
│ ├── curl.php
│ ├── detach.php
│ ├── download.php
│ ├── empty.txt
│ ├── event-stream.php
│ ├── moc.moc
│ ├── no-compression.php
│ ├── post.data
│ ├── raw.php
│ ├── redirect.php
│ ├── server.php
│ ├── static_handler.php
│ └── test.txt
├── http2
│ ├── server.php
│ ├── streaming.php
│ └── test.html
├── ipv6
│ ├── tcp_client.php
│ ├── tcp_server.php
│ ├── udp_client.php
│ └── udp_server.php
├── length
│ ├── client.php
│ ├── config.php
│ ├── func.php
│ └── server.php
├── lock
│ └── lock.php
├── misc
│ ├── get_local_ip.php
│ └── version.php
├── multicast
│ ├── client.php
│ └── server.php
├── php
│ ├── buf_size.php
│ ├── debug_server.php
│ ├── error.php
│ ├── exception.php
│ ├── func.php
│ ├── inotify.php
│ ├── proc.php
│ ├── socket_client.php
│ ├── socket_server.php
│ ├── stream_client.php
│ ├── stream_server.php
│ └── tick.php
├── postgresql
│ └── postgresql_coro.php
├── process
│ ├── alarm.php
│ ├── async_master.php
│ ├── client.php
│ ├── client3.php
│ ├── close.php
│ ├── daemon.php
│ ├── echo.py
│ ├── exec.php
│ ├── func_timeout.php
│ ├── msg_pop.php
│ ├── msg_push.php
│ ├── msgqueue.php
│ ├── msgqueue2.php
│ ├── msgqueue_client.php
│ ├── msgqueue_pool.php
│ ├── pool_socket.php
│ ├── python.php
│ ├── select.php
│ ├── set_cpu_affinity.php
│ ├── stdin_stdout.php
│ ├── test.php
│ └── worker.php
├── process_pool
│ ├── detach.php
│ └── send.php
├── runtime
│ ├── coroutine.php
│ ├── curl.php
│ ├── file.php
│ ├── gethostbyname.php
│ ├── include.php
│ ├── mkdir.php
│ ├── oci.php
│ ├── odbc.php
│ ├── read.php
│ ├── rename.phpt
│ ├── select.php
│ ├── sleep.php
│ ├── sqlite.php
│ ├── ssl.php
│ ├── stream.php
│ ├── sync.php
│ ├── time_sleep_until.php
│ └── unlink.phpt
├── server
│ ├── db_pool.php
│ ├── dispatch_func.php
│ ├── dispatch_stream.php
│ ├── echo.php
│ ├── eof_client.php
│ ├── eof_server.php
│ ├── getReceivedTime.php
│ ├── host_update.php
│ ├── hot_update_class.php
│ ├── ip_dispatch.php
│ ├── length_client.php
│ ├── length_server.php
│ ├── listen_1k_port.php
│ ├── local_listener.php
│ ├── manager_timer.php
│ ├── mixed.php
│ ├── multi_instance.php
│ ├── multi_port.php
│ ├── pipe_message.php
│ ├── proxy_sync.php
│ ├── redis_pool.php
│ ├── reload_aysnc.php
│ ├── reload_force.php
│ ├── reload_force2.php
│ ├── send_1m.php
│ ├── sendfile.php
│ ├── single.php
│ ├── tcp_client.php
│ ├── tcp_server.php
│ ├── trace.php
│ ├── uid_dispatch.php
│ ├── unix_stream.php
│ └── zmq.php
├── socket_coro
│ ├── client.php
│ ├── server.php
│ └── udp.php
├── ssl
│ ├── ca
│ │ ├── ca-cert.pem
│ │ ├── ca-key.pem
│ │ ├── ca-req.csr
│ │ ├── client-cert.pem
│ │ ├── client-key.pem
│ │ ├── client-req.csr
│ │ ├── client.crt
│ │ ├── client.key
│ │ ├── server-cert.pem
│ │ ├── server-key.pem
│ │ └── server-req.csr
│ ├── client.c
│ ├── client.php
│ ├── co_client.php
│ ├── gen_cert.md
│ ├── http_client.php
│ ├── passphrase.php
│ ├── server.php
│ ├── ssl.crt
│ ├── ssl.csr
│ ├── ssl.key
│ ├── ssl_passwd
│ │ ├── ssl.crt
│ │ ├── ssl.csr
│ │ └── ssl.key
│ ├── stream_client.php
│ ├── swoole.log
│ ├── webserver.php
│ ├── websocket_client.html
│ └── websocket_server.php
├── table
│ ├── deadlock.php
│ ├── iterator.php
│ ├── server.php
│ ├── set.php
│ ├── simulation.php
│ └── usage.php
├── task
│ ├── http.php
│ ├── msg_push.php
│ ├── shared_client.php
│ ├── shared_server.php
│ ├── task.php
│ ├── task_coro.php
│ ├── task_num.php
│ ├── task_queue.php
│ └── task_stream.php
├── test.jpg
├── thread
│ ├── aio.php
│ ├── argv.php
│ ├── array.php
│ ├── atomic.php
│ ├── benchmark.php
│ ├── co.php
│ ├── exit.php
│ ├── hook.php
│ ├── lock.php
│ ├── map.php
│ ├── mt.php
│ ├── nested_map.php
│ ├── pipe.php
│ ├── run_test.php
│ ├── server.php
│ ├── signal.php
│ ├── socket.php
│ ├── test.php
│ ├── thread_pool.php
│ └── thread_server.php
├── timer
│ ├── after.php
│ ├── clear.php
│ ├── enable_coroutine.php
│ └── tick.php
├── udp
│ ├── client.php
│ └── server.php
├── unixsock
│ ├── dgram_client.php
│ ├── dgram_server.php
│ ├── stream_client.php
│ └── stream_server.php
├── websocket
│ ├── client.html
│ ├── client.php
│ └── server.php
└── www
│ ├── dir1
│ ├── file1.txt
│ └── file2.txt
│ ├── dir2
│ ├── file1.txt
│ ├── file2.txt
│ └── index.txt
│ ├── file1.txt
│ ├── file2.txt
│ ├── index.html
│ └── index.txt
├── ext-src
├── php_swoole.cc
├── php_swoole_call_stack.h
├── php_swoole_client.h
├── php_swoole_coroutine.h
├── php_swoole_coroutine_system.h
├── php_swoole_curl.h
├── php_swoole_cxx.cc
├── php_swoole_cxx.h
├── php_swoole_http.h
├── php_swoole_http_server.h
├── php_swoole_library.h
├── php_swoole_odbc.h
├── php_swoole_oracle.h
├── php_swoole_pgsql.h
├── php_swoole_private.h
├── php_swoole_process.h
├── php_swoole_server.h
├── php_swoole_sqlite.h
├── php_swoole_thread.h
├── stubs
│ ├── php_swoole.stub.php
│ ├── php_swoole_arginfo.h
│ ├── php_swoole_atomic.stub.php
│ ├── php_swoole_atomic_arginfo.h
│ ├── php_swoole_channel_coro.stub.php
│ ├── php_swoole_channel_coro_arginfo.h
│ ├── php_swoole_client.stub.php
│ ├── php_swoole_client_arginfo.h
│ ├── php_swoole_client_async.stub.php
│ ├── php_swoole_client_async_arginfo.h
│ ├── php_swoole_client_coro.stub.php
│ ├── php_swoole_client_coro_arginfo.h
│ ├── php_swoole_coroutine.stub.php
│ ├── php_swoole_coroutine_arginfo.h
│ ├── php_swoole_coroutine_lock.stub.php
│ ├── php_swoole_coroutine_lock_arginfo.h
│ ├── php_swoole_coroutine_scheduler.stub.php
│ ├── php_swoole_coroutine_scheduler_arginfo.h
│ ├── php_swoole_coroutine_system.stub.php
│ ├── php_swoole_coroutine_system_arginfo.h
│ ├── php_swoole_event.stub.php
│ ├── php_swoole_event_arginfo.h
│ ├── php_swoole_ex.stub.php
│ ├── php_swoole_ex_arginfo.h
│ ├── php_swoole_http2_client_coro.stub.php
│ ├── php_swoole_http2_client_coro_arginfo.h
│ ├── php_swoole_http_client_coro.stub.php
│ ├── php_swoole_http_client_coro_arginfo.h
│ ├── php_swoole_http_cookie.stub.php
│ ├── php_swoole_http_cookie_arginfo.h
│ ├── php_swoole_http_request.stub.php
│ ├── php_swoole_http_request_arginfo.h
│ ├── php_swoole_http_response.stub.php
│ ├── php_swoole_http_response_arginfo.h
│ ├── php_swoole_http_server_coro.stub.php
│ ├── php_swoole_http_server_coro_arginfo.h
│ ├── php_swoole_lock.stub.php
│ ├── php_swoole_lock_arginfo.h
│ ├── php_swoole_name_resolver.stub.php
│ ├── php_swoole_name_resolver_arginfo.h
│ ├── php_swoole_process.stub.php
│ ├── php_swoole_process_arginfo.h
│ ├── php_swoole_process_pool.stub.php
│ ├── php_swoole_process_pool_arginfo.h
│ ├── php_swoole_redis_server.stub.php
│ ├── php_swoole_redis_server_arginfo.h
│ ├── php_swoole_runtime.stub.php
│ ├── php_swoole_runtime_arginfo.h
│ ├── php_swoole_server.stub.php
│ ├── php_swoole_server_arginfo.h
│ ├── php_swoole_server_port.stub.php
│ ├── php_swoole_server_port_arginfo.h
│ ├── php_swoole_socket_coro.stub.php
│ ├── php_swoole_socket_coro_arginfo.h
│ ├── php_swoole_table.stub.php
│ ├── php_swoole_table_arginfo.h
│ ├── php_swoole_thread.stub.php
│ ├── php_swoole_thread_arginfo.h
│ ├── php_swoole_thread_arraylist.stub.php
│ ├── php_swoole_thread_arraylist_arginfo.h
│ ├── php_swoole_thread_atomic.stub.php
│ ├── php_swoole_thread_atomic_arginfo.h
│ ├── php_swoole_thread_barrier.stub.php
│ ├── php_swoole_thread_barrier_arginfo.h
│ ├── php_swoole_thread_lock.stub.php
│ ├── php_swoole_thread_lock_arginfo.h
│ ├── php_swoole_thread_map.stub.php
│ ├── php_swoole_thread_map_arginfo.h
│ ├── php_swoole_thread_queue.stub.php
│ ├── php_swoole_thread_queue_arginfo.h
│ ├── php_swoole_timer.stub.php
│ ├── php_swoole_timer_arginfo.h
│ ├── php_swoole_websocket.stub.php
│ └── php_swoole_websocket_arginfo.h
├── swoole_admin_server.cc
├── swoole_async_coro.cc
├── swoole_atomic.cc
├── swoole_channel_coro.cc
├── swoole_client.cc
├── swoole_client_async.cc
├── swoole_client_coro.cc
├── swoole_coroutine.cc
├── swoole_coroutine_lock.cc
├── swoole_coroutine_scheduler.cc
├── swoole_coroutine_system.cc
├── swoole_curl.cc
├── swoole_curl_interface.h
├── swoole_event.cc
├── swoole_http2_client_coro.cc
├── swoole_http2_server.cc
├── swoole_http_client_coro.cc
├── swoole_http_cookie.cc
├── swoole_http_request.cc
├── swoole_http_response.cc
├── swoole_http_server.cc
├── swoole_http_server_coro.cc
├── swoole_lock.cc
├── swoole_name_resolver.cc
├── swoole_odbc.cc
├── swoole_oracle.cc
├── swoole_pgsql.cc
├── swoole_process.cc
├── swoole_process_pool.cc
├── swoole_redis_server.cc
├── swoole_runtime.cc
├── swoole_server.cc
├── swoole_server_port.cc
├── swoole_socket_coro.cc
├── swoole_sqlite.cc
├── swoole_table.cc
├── swoole_thread.cc
├── swoole_thread_arraylist.cc
├── swoole_thread_atomic.cc
├── swoole_thread_barrier.cc
├── swoole_thread_lock.cc
├── swoole_thread_map.cc
├── swoole_thread_queue.cc
├── swoole_timer.cc
└── swoole_websocket_server.cc
├── gdbinit
├── include
├── helper
│ └── kqueue.h
├── swoole.h
├── swoole_api.h
├── swoole_asm_context.h
├── swoole_async.h
├── swoole_atomic.h
├── swoole_base64.h
├── swoole_buffer.h
├── swoole_c_api.h
├── swoole_channel.h
├── swoole_client.h
├── swoole_config.h
├── swoole_coroutine.h
├── swoole_coroutine_c_api.h
├── swoole_coroutine_channel.h
├── swoole_coroutine_context.h
├── swoole_coroutine_socket.h
├── swoole_coroutine_system.h
├── swoole_dtls.h
├── swoole_error.h
├── swoole_file.h
├── swoole_file_hook.h
├── swoole_hash.h
├── swoole_heap.h
├── swoole_http.h
├── swoole_http2.h
├── swoole_iouring.h
├── swoole_lock.h
├── swoole_log.h
├── swoole_lru_cache.h
├── swoole_memory.h
├── swoole_message_bus.h
├── swoole_mime_type.h
├── swoole_mqtt.h
├── swoole_msg_queue.h
├── swoole_pipe.h
├── swoole_process_pool.h
├── swoole_protocol.h
├── swoole_proxy.h
├── swoole_reactor.h
├── swoole_redis.h
├── swoole_server.h
├── swoole_signal.h
├── swoole_socket.h
├── swoole_socket_hook.h
├── swoole_ssl.h
├── swoole_static_handler.h
├── swoole_string.h
├── swoole_table.h
├── swoole_thread.h
├── swoole_timer.h
├── swoole_util.h
├── swoole_version.h
└── swoole_websocket.h
├── package.xml
├── php_swoole.h
├── run-core-tests.sh
├── scripts
├── .gitignore
├── clear.sh
├── code-format.sh
├── code-stats.sh
├── debug
│ ├── swoole_info.php
│ └── swoole_table_implements.php
├── docker-compile-with-iouring.sh
├── docker-compile-with-thread.sh
├── docker-compile.sh
├── docker-compose.yml
├── docker-iouring-route.sh
├── docker-route.sh
├── docker-thread-route.sh
├── format-changed-files.sh
├── install-deps-on-ubuntu.sh
├── library.sh
├── make.sh
├── pecl-install.sh
├── rename.php
├── route.sh
├── run-tests.sh
├── simple-compile-on-github.sh
└── simple-compile.sh
├── src
├── core
│ ├── base.cc
│ ├── base64.cc
│ ├── channel.cc
│ ├── crc32.cc
│ ├── error.cc
│ ├── heap.cc
│ ├── log.cc
│ ├── misc.cc
│ ├── string.cc
│ └── timer.cc
├── coroutine
│ ├── base.cc
│ ├── channel.cc
│ ├── context.cc
│ ├── file_lock.cc
│ ├── hook.cc
│ ├── iouring.cc
│ ├── socket.cc
│ ├── system.cc
│ └── thread_context.cc
├── lock
│ ├── barrier.cc
│ ├── coroutine_lock.cc
│ ├── mutex.cc
│ ├── rw_lock.cc
│ └── spin_lock.cc
├── memory
│ ├── buffer.cc
│ ├── fixed_pool.cc
│ ├── global_memory.cc
│ ├── ring_buffer.cc
│ ├── shared_memory.cc
│ └── table.cc
├── network
│ ├── address.cc
│ ├── client.cc
│ ├── dns.cc
│ ├── socket.cc
│ └── stream.cc
├── os
│ ├── async_thread.cc
│ ├── base.cc
│ ├── file.cc
│ ├── msg_queue.cc
│ ├── pipe.cc
│ ├── process_pool.cc
│ ├── sendfile.cc
│ ├── signal.cc
│ ├── timer.cc
│ ├── unix_socket.cc
│ └── wait.cc
├── protocol
│ ├── base.cc
│ ├── dtls.cc
│ ├── http.cc
│ ├── http2.cc
│ ├── message_bus.cc
│ ├── mime_type.cc
│ ├── mqtt.cc
│ ├── redis.cc
│ ├── socks5.cc
│ ├── ssl.cc
│ └── websocket.cc
├── reactor
│ ├── base.cc
│ ├── epoll.cc
│ ├── kqueue.cc
│ └── poll.cc
├── server
│ ├── base.cc
│ ├── manager.cc
│ ├── master.cc
│ ├── port.cc
│ ├── process.cc
│ ├── reactor_process.cc
│ ├── reactor_thread.cc
│ ├── static_handler.cc
│ ├── task_worker.cc
│ ├── thread.cc
│ └── worker.cc
└── wrapper
│ ├── event.cc
│ ├── http.cc
│ └── timer.cc
├── tests
├── .php-cs-fixer.dist.php
├── CONTRIBUTION
├── README.md
├── clean
├── include
│ ├── api
│ │ ├── curl_multi.php
│ │ ├── exit.php
│ │ ├── http_server.php
│ │ ├── http_test_cases.php
│ │ ├── swoole_callback
│ │ │ └── swoole_cannot_destroy_active_lambda_function.php
│ │ ├── swoole_client
│ │ │ ├── connect_timeout.php
│ │ │ ├── connect_twice.php
│ │ │ ├── http_get.php
│ │ │ ├── opcode_client.php
│ │ │ ├── simple_client.php
│ │ │ └── socket_free.php
│ │ ├── swoole_http_server
│ │ │ ├── http_server.php
│ │ │ ├── http_server_without_response.php
│ │ │ ├── simple_http_server.php
│ │ │ └── simple_https_server.php
│ │ ├── swoole_server
│ │ │ ├── TestServer.php
│ │ │ ├── multi_protocol_server.php
│ │ │ ├── opcode_server.php
│ │ │ ├── reconnect_fail
│ │ │ │ ├── tcp_client.php
│ │ │ │ └── tcp_serv.php
│ │ │ ├── server_manager_process_exit.php
│ │ │ ├── server_send_fast_recv_slow.php
│ │ │ ├── simple_server.php
│ │ │ ├── simple_tcp_server.php
│ │ │ ├── simple_udp_server.php
│ │ │ ├── tcp_serv.php
│ │ │ ├── tcp_task_server.php
│ │ │ └── testsendfile.txt
│ │ ├── swoole_thread
│ │ │ ├── putenv.php
│ │ │ └── sleep.php
│ │ ├── swoole_timer
│ │ │ ├── accurate_test.php
│ │ │ ├── fixRate_vs_fixDelay.php
│ │ │ ├── invalid_args.php
│ │ │ ├── multi_timer.php
│ │ │ └── register_shutdown_priority.php
│ │ ├── swoole_websocket_server
│ │ │ ├── send_large_request_data.php
│ │ │ ├── send_small_request_data.php
│ │ │ ├── swoole_websocket_server.php
│ │ │ └── websocket_client.php
│ │ ├── syntax_error.txt
│ │ ├── tcp_server.php
│ │ └── test_classes
│ │ │ ├── A.php
│ │ │ ├── A2.php
│ │ │ └── B.php
│ ├── bootstrap.php
│ ├── config.php
│ ├── functions.php
│ ├── lib
│ │ ├── composer.json
│ │ └── src
│ │ │ ├── Assert.php
│ │ │ ├── ChildProcess.php
│ │ │ ├── CoServer.php
│ │ │ ├── CurlManager.php
│ │ │ ├── DbWrapper.php
│ │ │ ├── LengthServer.php
│ │ │ ├── MQTT
│ │ │ └── Helper.php
│ │ │ ├── MysqlPool.php
│ │ │ ├── ProcessManager.php
│ │ │ ├── RandStr.php
│ │ │ ├── Redis
│ │ │ ├── DBConnectException.php
│ │ │ ├── Lock.php
│ │ │ ├── Redis.php
│ │ │ └── SQLPool.php
│ │ │ ├── Samtleben
│ │ │ └── WebsocketClient.php
│ │ │ ├── ServerManager.php
│ │ │ ├── TcpStat.php
│ │ │ ├── ThreadManager.php
│ │ │ ├── WaitRef.php
│ │ │ └── responder
│ │ │ └── get.php
│ ├── macos
│ │ └── phpstorm.py
│ ├── skipif.inc
│ └── ssl_certs
│ │ ├── ca-cert.pem
│ │ ├── ca-key.pem
│ │ ├── ca-req.csr
│ │ ├── ca.crt
│ │ ├── ca.csr
│ │ ├── ca.key
│ │ ├── ca.srl
│ │ ├── client-cert.pem
│ │ ├── client-expired.crt
│ │ ├── client-expired.csr
│ │ ├── client-expired.key
│ │ ├── client-key.pem
│ │ ├── client-req.csr
│ │ ├── client.crt
│ │ ├── client.csr
│ │ ├── client.key
│ │ ├── client.pem
│ │ ├── dhparams.pem
│ │ ├── mosquitto.org.crt
│ │ ├── passwd.crt
│ │ ├── passwd_key.pem
│ │ ├── server-cert.pem
│ │ ├── server-key.pem
│ │ ├── server-req.csr
│ │ ├── server.crt
│ │ ├── server.csr
│ │ ├── server.key
│ │ ├── server.pem
│ │ ├── sni_server_ca.pem
│ │ ├── sni_server_cs.pem
│ │ ├── sni_server_cs_cert.pem
│ │ ├── sni_server_cs_key.pem
│ │ ├── sni_server_uk.pem
│ │ ├── sni_server_uk_cert.pem
│ │ ├── sni_server_uk_key.pem
│ │ ├── sni_server_us.pem
│ │ ├── sni_server_us_cert.pem
│ │ └── sni_server_us_key.pem
├── init
├── new
├── pgsql.sql
├── php-cs-fixer
├── run-tests
├── start.sh
├── swoole_atomic
│ ├── atomic.phpt
│ ├── dtor_in_child.phpt
│ ├── multi_wakeup.phpt
│ ├── wait.phpt
│ ├── wait_and_wakeup.phpt
│ └── wait_ex.phpt
├── swoole_channel_coro
│ ├── 1.phpt
│ ├── 10.phpt
│ ├── 2.phpt
│ ├── 3.phpt
│ ├── 4.phpt
│ ├── 5.phpt
│ ├── 6.phpt
│ ├── 7.phpt
│ ├── 8.phpt
│ ├── 9.phpt
│ ├── basic.phpt
│ ├── benchmark.phpt
│ ├── blocking_timeout.phpt
│ ├── bug_1947.phpt
│ ├── bug_clear_timer.phpt
│ ├── chan_select_timeout.phpt
│ ├── chan_stats.phpt
│ ├── close.phpt
│ ├── coro_wait.phpt
│ ├── discard.phpt
│ ├── fibonacci.phpt
│ ├── http2.phpt
│ ├── hybird_chan.phpt
│ ├── hybird_chan2.phpt
│ ├── hybird_chan3.phpt
│ ├── lock.phpt
│ ├── no_ctor.phpt
│ ├── pool.phpt
│ ├── pop_after_close.phpt
│ ├── pop_close1.phpt
│ ├── pop_timeout1.phpt
│ ├── pop_timeout2.phpt
│ ├── pop_timeout3.phpt
│ ├── pop_timeout4.phpt
│ ├── pop_timeout5.phpt
│ ├── pop_timeout6.phpt
│ ├── pop_timeout7.phpt
│ ├── pop_timeout8.phpt
│ ├── push_close1.phpt
│ ├── push_timeout1.phpt
│ ├── push_timeout2.phpt
│ ├── push_timeout3.phpt
│ ├── push_timeout4.phpt
│ └── type.phpt
├── swoole_client_async
│ ├── base.phpt
│ ├── big_package_memory_leak.phpt
│ ├── buffer_full.phpt
│ ├── connect_dns.phpt
│ ├── connect_refuse.phpt
│ ├── connect_refuse_udg.phpt
│ ├── connect_refuse_unix.phpt
│ ├── connect_timeout.phpt
│ ├── connect_twice.phpt
│ ├── enableSSL.phpt
│ ├── enableSSL_bad_callback.phpt
│ ├── enableSSL_before_connect.phpt
│ ├── eof.phpt
│ ├── eof_close.phpt
│ ├── getSocket_bug.phpt
│ ├── getpeername.phpt
│ ├── getsockname.phpt
│ ├── length_protocol.phpt
│ ├── length_protocol_func.phpt
│ ├── port_invalid.phpt
│ ├── sendfile.phpt
│ └── sleep_wake.phpt
├── swoole_client_coro
│ ├── bug_2346.phpt
│ ├── close.phpt
│ ├── close_in_other_co.phpt
│ ├── close_resume.phpt
│ ├── close_socket_property.phpt
│ ├── close_twice.phpt
│ ├── connect_dns_timeout.phpt
│ ├── connect_timeout.phpt
│ ├── connect_with_dns.phpt
│ ├── dtls.phpt
│ ├── enableSSL.phpt
│ ├── eof.phpt
│ ├── eof_02.phpt
│ ├── eof_03.phpt
│ ├── eof_04.phpt
│ ├── export_socket.phpt
│ ├── fixed_package.phpt
│ ├── getpeername.phpt
│ ├── getsockname.phpt
│ ├── isConnected.phpt
│ ├── length_01.phpt
│ ├── length_02.phpt
│ ├── length_03.phpt
│ ├── length_04.phpt
│ ├── length_protocol_func.phpt
│ ├── length_types.phpt
│ ├── read_and_write.phpt
│ ├── reconnect.phpt
│ ├── reconnect_2.phpt
│ ├── reconnect_3.phpt
│ ├── recv_after_close.phpt
│ ├── recv_bad_packet.phpt
│ ├── recv_timeout.phpt
│ ├── recv_timeout2.phpt
│ ├── recvfrom.phpt
│ ├── recvfrom_2.phpt
│ ├── recvfrom_timeout.phpt
│ ├── recvfrom_timeout2.phpt
│ ├── send_big.phpt
│ ├── sendfile.phpt
│ ├── sendto.phpt
│ ├── ssl.phpt
│ ├── ssl_verify.phpt
│ ├── tcp_client.phpt
│ ├── tcp_nodelay.phpt
│ ├── timeout.phpt
│ ├── udp_client.phpt
│ ├── udp_recv_failed.phpt
│ ├── unsock_dgram.phpt
│ └── unsock_stream.phpt
├── swoole_client_sync
│ ├── bind_address.phpt
│ ├── connect_1.phpt
│ ├── connect_2.phpt
│ ├── connect_3.phpt
│ ├── enableSSL.phpt
│ ├── enableSSL_2.phpt
│ ├── eof.phpt
│ ├── eof_close.phpt
│ ├── eof_timeout.phpt
│ ├── http_proxy.phpt
│ ├── keep1.phpt
│ ├── keep2.phpt
│ ├── keep3.phpt
│ ├── keep4.phpt
│ ├── keep5.phpt
│ ├── keep6.phpt
│ ├── length_protocol.phpt
│ ├── length_protocol_02.phpt
│ ├── length_protocol_func.phpt
│ ├── recv_in_task.phpt
│ ├── recv_timeout.phpt
│ ├── recv_with_open_eof_check.phpt
│ ├── select.phpt
│ ├── select_null.phpt
│ ├── send_recv.phpt
│ ├── sendfile.phpt
│ ├── sendto.phpt
│ ├── socks5_proxy.phpt
│ ├── ssl_recv_timeout.phpt
│ ├── sync_send_recv.phpt
│ ├── udg_send_timeout.phpt
│ └── udp_client_sendto.phpt
├── swoole_coroutine
│ ├── after_start_server_1.phpt
│ ├── all_asleep.phpt
│ ├── array_walk.phpt
│ ├── array_walk_deep.phpt
│ ├── async_callback
│ │ ├── event_cycle.phpt
│ │ ├── signal.phpt
│ │ └── timer.phpt
│ ├── autoload.phpt
│ ├── autoload_not_found.phpt
│ ├── autoload_not_found_not_in_coroutine.phpt
│ ├── autoload_not_in_coroutine.phpt
│ ├── bailout
│ │ ├── co_redis_in_shutdown_function.phpt
│ │ ├── error.phpt
│ │ ├── error_in.phpt
│ │ ├── error_internal.phpt
│ │ ├── error_internal2.phpt
│ │ ├── error_out.phpt
│ │ └── exit.phpt
│ ├── before_create_server_1.phpt
│ ├── before_create_server_2.phpt
│ ├── before_create_server_3.phpt
│ ├── bug_2387.phpt
│ ├── bug_5699.phpt
│ ├── c_stack_size.phpt
│ ├── call_not_exists_func.phpt
│ ├── call_user_func_array.phpt
│ ├── call_user_func_array2.phpt
│ ├── call_with_args.phpt
│ ├── callback.phpt
│ ├── cancel
│ │ ├── channel_pop.phpt
│ │ ├── channel_push.phpt
│ │ ├── error.phpt
│ │ ├── gethostbyname.phpt
│ │ ├── sleep.phpt
│ │ ├── socket.phpt
│ │ ├── suspend.phpt
│ │ ├── wait.phpt
│ │ ├── wait_event.phpt
│ │ └── wait_signal.phpt
│ ├── check.phpt
│ ├── cid.phpt
│ ├── create_after_rshutdown.phpt
│ ├── current.phpt
│ ├── dead_lock.phpt
│ ├── defer
│ │ ├── defer.phpt
│ │ ├── defer_close.phpt
│ │ ├── defer_exception.phpt
│ │ └── defer_in_try.phpt
│ ├── destruct
│ │ ├── destruct1.phpt
│ │ ├── destruct2.phpt
│ │ └── destruct3.phpt
│ ├── dnslookup_1.phpt
│ ├── dnslookup_2.phpt
│ ├── dnslookup_3.phpt
│ ├── dnslookup_4.phpt
│ ├── dnslookup_5.phpt
│ ├── dnslookup_ipv6.phpt
│ ├── dnslookup_query_hosts.phpt
│ ├── empty.phpt
│ ├── eval.phpt
│ ├── exception.phpt
│ ├── exception
│ │ ├── core_error.phpt
│ │ ├── defer1.phpt
│ │ ├── defer2.phpt
│ │ ├── dtor.phpt
│ │ ├── empty.phpt
│ │ ├── error.phpt
│ │ ├── error1.phpt
│ │ ├── error2.phpt
│ │ ├── error3.phpt
│ │ ├── fatal_error.phpt
│ │ ├── nested.phpt
│ │ ├── yield.phpt
│ │ └── yield1.phpt
│ ├── execute_time.phpt
│ ├── exists.phpt
│ ├── exit.phpt
│ ├── exit_84.phpt
│ ├── exit_exception_backtrace.phpt
│ ├── exit_exception_backtrace_84.phpt
│ ├── fatal_error.phpt
│ ├── forbidden_case
│ │ ├── array_map.phpt
│ │ ├── call_user.phpt
│ │ └── invoke.phpt
│ ├── getContext.phpt
│ ├── getElasped.phpt
│ ├── getPcid.phpt
│ ├── getPcid_by_random_cid.phpt.phpt
│ ├── gethostbyname.phpt
│ ├── iterator.phpt
│ ├── join
│ │ ├── 1.phpt
│ │ ├── 2.phpt
│ │ ├── 3.phpt
│ │ ├── 4.phpt
│ │ ├── 5.phpt
│ │ ├── 6.phpt
│ │ ├── 7.phpt
│ │ └── 8.phpt
│ ├── kernel_coroutine.phpt
│ ├── list_and_backtrace.phpt
│ ├── max_num.phpt
│ ├── max_num_limit.phpt
│ ├── nested1.phpt
│ ├── nested2.phpt
│ ├── nested3.phpt
│ ├── nested_empty.phpt
│ ├── nested_uid.phpt
│ ├── new_process.phpt
│ ├── new_server.phpt
│ ├── no_inline_func.phpt
│ ├── output
│ │ ├── create.phpt
│ │ ├── in_nested_co.phpt
│ │ ├── ob_main.phpt
│ │ └── output_control.phpt
│ ├── parallel1.phpt
│ ├── parallel2.phpt
│ ├── parallel3.phpt
│ ├── pdo_error_handing.phpt
│ ├── private_access.phpt
│ ├── resume_loop.phpt
│ ├── scheduler.phpt
│ ├── signal_listener.phpt
│ ├── stats.phpt
│ ├── use_process.phpt
│ ├── user_coroutine.phpt
│ └── user_coroutine_2.phpt
├── swoole_coroutine_lock
│ ├── lock.phpt
│ ├── trylock.phpt
│ └── trylock2.phpt
├── swoole_coroutine_scheduler
│ ├── getOptions.phpt
│ ├── hook_flags.phpt
│ ├── hook_flags_2.phpt
│ ├── parallel.phpt
│ ├── preemptive
│ │ ├── disable.phpt
│ │ ├── disable2.phpt
│ │ ├── do-while.phpt
│ │ ├── do-while2.phpt
│ │ ├── do-while3.phpt
│ │ ├── for.phpt
│ │ ├── for2.phpt
│ │ ├── goto.phpt
│ │ ├── goto2.phpt
│ │ ├── timer.phpt
│ │ ├── while.phpt
│ │ ├── while2.phpt
│ │ └── while3.phpt
│ ├── repeat.phpt
│ ├── resume1.phpt
│ ├── resume2.phpt
│ ├── resume3.phpt
│ ├── resume4.phpt
│ ├── resume5.phpt
│ ├── resume6.phpt
│ ├── start.phpt
│ ├── start_in_server_shutdown.phpt
│ └── start_in_server_worker_stop.phpt
├── swoole_coroutine_system
│ ├── aio_thread_num.phpt
│ ├── getaddrinfo.phpt
│ ├── getaddrinfo_timeout.phpt
│ ├── gethostbyname.phpt
│ ├── gethostbyname_ipv6.phpt
│ ├── gethostbyname_timeout.phpt
│ ├── readfile.phpt
│ ├── sleep.phpt
│ ├── wait.phpt
│ ├── waitEvent.phpt
│ ├── waitPid.phpt
│ ├── waitSignal.phpt
│ ├── waitSignal_2.phpt
│ ├── writefile.phpt
│ └── writefile_append.phpt
├── swoole_coroutine_util
│ ├── dns_lookup.phpt
│ ├── exec.phpt
│ ├── exec_sleep.phpt
│ ├── fgets.phpt
│ ├── fread.phpt
│ ├── fwrite.phpt
│ ├── list_coroutine.phpt
│ └── task_worker.phpt
├── swoole_coroutine_wait_group
│ ├── base.phpt
│ ├── defer.phpt
│ ├── empty.phpt
│ └── logic.phpt
├── swoole_curl
│ ├── abnormal_response
│ │ ├── 1.phpt
│ │ └── 2.phpt
│ ├── basic
│ │ ├── 1.phpt
│ │ ├── 10.phpt
│ │ ├── 11.phpt
│ │ ├── 12.phpt
│ │ ├── 13.phpt
│ │ ├── 14.phpt
│ │ ├── 15.phpt
│ │ ├── 19.phpt
│ │ ├── 2.phpt
│ │ ├── 20.phpt
│ │ ├── 21.phpt
│ │ ├── 22.phpt
│ │ ├── 23.phpt
│ │ ├── 24.phpt
│ │ ├── 25.phpt
│ │ ├── 3.phpt
│ │ ├── 4.phpt
│ │ ├── 5.phpt
│ │ ├── 7.phpt
│ │ ├── 8.phpt
│ │ └── 9.phpt
│ ├── cancel.phpt
│ ├── close_before_resume.phpt
│ ├── concurrent.phpt
│ ├── error.phpt
│ ├── event_exit.phpt
│ ├── exec_twice.phpt
│ ├── fatal_error_in_callback.phpt
│ ├── ftp.phpt
│ ├── guzzle.phpt
│ ├── guzzle
│ │ ├── cancel.phpt
│ │ ├── cannot_cancel_finished.phpt
│ │ ├── cookie.phpt
│ │ ├── promise.phpt
│ │ ├── request_async.phpt
│ │ ├── request_on_stats.phpt
│ │ └── send_async.phpt
│ ├── https.phpt
│ ├── keepalive.phpt
│ ├── multi
│ │ ├── add_after_easy_exec.phpt
│ │ ├── bug4393.phpt
│ │ ├── bug48203_multi.phpt
│ │ ├── bug67643.phpt
│ │ ├── bug71523.phpt
│ │ ├── bug76675.phpt
│ │ ├── bug77535.phpt
│ │ ├── bug77946.phpt
│ │ ├── curl_basic_018.phpt
│ │ ├── curl_copy_handle_variation4.phpt
│ │ ├── curl_int_cast.phpt
│ │ ├── curl_multi_close_basic.phpt
│ │ ├── curl_multi_close_basic001.phpt
│ │ ├── curl_multi_close_reference.phpt
│ │ ├── curl_multi_errno_strerror_001.phpt
│ │ ├── curl_multi_getcontent_basic3.phpt
│ │ ├── curl_multi_info_read.phpt
│ │ ├── curl_multi_init_basic.phpt
│ │ ├── curl_multi_segfault.phpt
│ │ ├── curl_multi_select_basic1.phpt
│ │ ├── curl_multi_setopt_basic001.phpt
│ │ ├── multiple_binding.phpt
│ │ └── no_hook.phpt
│ ├── multi_1.phpt
│ ├── multi_2.phpt
│ ├── multi_3.phpt
│ ├── multi_4.phpt
│ ├── multi_close.phpt
│ ├── multi_dtor.phpt
│ ├── non_exclusive.phpt
│ ├── select_cancel.phpt
│ ├── select_timeout.phpt
│ ├── select_twice.phpt
│ ├── setopt
│ │ ├── 1.phpt
│ │ ├── 3.phpt
│ │ ├── 4.phpt
│ │ ├── 5_skip.phpt
│ │ ├── filetime_1.phpt
│ │ ├── filetime_2.phpt
│ │ ├── header_out.phpt
│ │ ├── infile.phpt
│ │ └── nobody.phpt
│ ├── share
│ │ ├── 1.phpt
│ │ └── 5.phpt
│ ├── sleep.phpt
│ ├── ssl
│ │ └── version.phpt
│ ├── symfony-noco.phpt
│ ├── symfony.phpt
│ ├── template
│ ├── timer_coredump.phpt
│ ├── undefined_behavior
│ │ ├── 0.phpt
│ │ ├── 1.phpt
│ │ ├── 2.phpt
│ │ ├── 3.phpt
│ │ ├── 4.phpt
│ │ ├── 5.phpt
│ │ ├── 6.phpt
│ │ ├── 7.phpt
│ │ └── 8.phpt
│ ├── upload
│ │ ├── 1.phpt
│ │ ├── 2.phpt
│ │ ├── 3.phpt
│ │ ├── curl_testdata1.txt
│ │ └── curl_testdata2.txt
│ └── yield_in_callback.phpt
├── swoole_event
│ ├── add_after_server_start.phpt
│ ├── cycle.phpt
│ ├── defer.phpt
│ ├── defer_with_sleep.phpt
│ ├── defer_without_io.phpt
│ ├── del.phpt
│ ├── del_after_close.phpt
│ ├── deprecated_event_wait.phpt
│ ├── dispatch.phpt
│ ├── function_alias.phpt
│ ├── isset.phpt
│ ├── rshutdown.phpt
│ ├── set.phpt
│ ├── simple.phpt
│ ├── sockets.phpt
│ ├── sync_client_1.phpt
│ ├── sync_client_2.phpt
│ ├── wait.phpt
│ └── write.phpt
├── swoole_feature
│ ├── cross_close
│ │ ├── client.phpt
│ │ ├── client_by_server.phpt
│ │ ├── full_duplex.phpt
│ │ ├── full_duplex_by_server.phpt
│ │ ├── http.phpt
│ │ ├── http_by_server.phpt
│ │ ├── php_stream_full_duplex.phpt
│ │ ├── php_stream_full_duplex_by_server.phpt
│ │ ├── redis.phpt
│ │ ├── redis_by_server.phpt
│ │ ├── stream.phpt
│ │ └── stream_by_server.phpt
│ └── full_duplex
│ │ ├── client.phpt
│ │ ├── socket.phpt
│ │ ├── socket_ssl.phpt
│ │ └── websocket.phpt
├── swoole_function
│ ├── substr_json_decode.phpt
│ ├── substr_unserialize.phpt
│ ├── swoole_clear_dns_cache.phpt
│ ├── swoole_cpu_num.phpt
│ ├── swoole_error_log.phpt
│ ├── swoole_get_local_ip.phpt
│ ├── swoole_get_local_mac.phpt
│ ├── swoole_set_process_name.phpt
│ ├── swoole_strerror.phpt
│ └── swoole_version.phpt
├── swoole_global
│ ├── channel_construct_check.phpt
│ ├── closed_stdout.phpt
│ ├── create_deny.phpt
│ ├── function_alias.phpt
│ ├── serialize_deny.phpt
│ ├── socket_construct_check.phpt
│ ├── too_many_objects.phpt
│ ├── unset_deny.phpt
│ ├── unset_property_01.phpt
│ ├── unset_property_02.phpt
│ └── unset_property_03.phpt
├── swoole_http2_client_coro
│ ├── bug_5127.phpt
│ ├── connect_twice.phpt
│ ├── cookies.phpt
│ ├── error.phpt
│ ├── goaway.phpt
│ ├── headers.phpt
│ ├── host.phpt
│ ├── http_proxy.phpt
│ ├── huge_headers.phpt
│ ├── issues_2374.phpt
│ ├── multi.phpt
│ ├── no-gzip.phpt
│ ├── number.phpt
│ ├── ping.phpt
│ ├── pipeline.phpt
│ ├── post.phpt
│ ├── send-cookies.phpt
│ ├── send_only_bug.phpt
│ ├── set-cookies.phpt
│ ├── sock_type_unix.phpt
│ └── wrong_headers.phpt
├── swoole_http2_server
│ ├── big_data.phpt
│ ├── compression.phpt
│ ├── compression_types.phpt
│ ├── getMethod.phpt
│ ├── goaway.phpt
│ ├── http2_headers.phpt
│ ├── issue_4365.phpt
│ ├── max_concurrency.phpt
│ ├── nghttp2_big_data.phpt
│ ├── no_compression.phpt
│ ├── ping.phpt
│ ├── sendfile.phpt
│ ├── sendfile_content_type.phpt
│ ├── sendfile_set_content_type.phpt
│ ├── static_handler.phpt
│ ├── streaming.phpt
│ ├── streaming_2.phpt
│ ├── trailer.phpt
│ └── worker_max_concurrency.phpt
├── swoole_http2_server_coro
│ └── cookies.phpt
├── swoole_http_client_coro
│ ├── 204.phpt
│ ├── addData.phpt
│ ├── alias.phpt
│ ├── another_coroutine.phpt
│ ├── auto_reconnect.phpt
│ ├── bind_address.phpt
│ ├── bug_2661.phpt
│ ├── bug_3118.phpt
│ ├── compression_with_big_data.phpt
│ ├── connect_timeout.phpt
│ ├── connection_close.phpt
│ ├── construct_failed.phpt
│ ├── cookies_set_bug.phpt
│ ├── defer.phpt
│ ├── defer_02.phpt
│ ├── disable_keep_alive.phpt
│ ├── download.phpt
│ ├── download_302.phpt
│ ├── download_failed.phpt
│ ├── download_filename_bug.phpt
│ ├── duplicate_header.phpt
│ ├── error_handler.phpt
│ ├── get.phpt
│ ├── get_header_out_after_close.phpt
│ ├── get_twice.phpt
│ ├── get_twice_keepalive.phpt
│ ├── get_without_content_length.phpt
│ ├── h2c_upgrade.phpt
│ ├── head_method.phpt
│ ├── host.phpt
│ ├── http_chunk.phpt
│ ├── http_proxy.phpt
│ ├── http_proxy_443.phpt
│ ├── http_proxy_with_host_port.phpt
│ ├── http_upload_big.phpt
│ ├── https.phpt
│ ├── https_upload_big.phpt
│ ├── issue_2664.phpt
│ ├── keep_alive.phpt
│ ├── long_domain.phpt
│ ├── lowercase_header.phpt
│ ├── multi.phpt
│ ├── multi_and_reuse.phpt
│ ├── parser.phpt
│ ├── post_array.phpt
│ ├── reconnect_but_failed.phpt
│ ├── recv_slow_timeout.phpt
│ ├── recv_timeout.phpt
│ ├── set_basic_auth.phpt
│ ├── slow_server.phpt
│ ├── socks5_proxy.phpt
│ ├── ssl.phpt
│ ├── ssl_host_name.phpt
│ ├── ssl_verify_peer_1.phpt
│ ├── ssl_verify_peer_2.phpt
│ ├── timeout_before_connect.phpt
│ ├── timeout_when_recv.phpt
│ ├── unixsocket.phpt
│ ├── upload.phpt
│ ├── upload_huge.phpt
│ ├── upload_with_null_args.phpt
│ ├── websocket
│ │ ├── 1.phpt
│ │ ├── bug_01.phpt
│ │ ├── bug_02.phpt
│ │ ├── close_socket.phpt
│ │ ├── server_push_first.phpt
│ │ ├── ssl_1.phpt
│ │ ├── ssl_2.phpt
│ │ ├── timeout.phpt
│ │ └── upgrade_after_get.phpt
│ ├── write_func_1.phpt
│ └── write_func_2.phpt
├── swoole_http_server
│ ├── 0.phpt
│ ├── If_Modified_Since.phpt
│ ├── accept_encoding.phpt
│ ├── buffer_output_size.phpt
│ ├── bug_2368.phpt
│ ├── bug_2444.phpt
│ ├── bug_2608.phpt
│ ├── bug_2751.phpt
│ ├── bug_2786.phpt
│ ├── bug_2947.phpt
│ ├── bug_2988.phpt
│ ├── bug_4261.phpt
│ ├── bug_4857.phpt
│ ├── bug_5107.phpt
│ ├── bug_5114.phpt
│ ├── bug_5146.phpt
│ ├── bug_5186.phpt
│ ├── bug_compression_level.phpt
│ ├── bug_get_request_data_after_end.phpt
│ ├── callback_new_obj_method.phpt
│ ├── callback_new_static_method.phpt
│ ├── callback_string.phpt
│ ├── callback_with_internal_function.phpt
│ ├── callback_with_private.phpt
│ ├── callback_with_protected.phpt
│ ├── chunk.phpt
│ ├── chunk_with_end_data.phpt
│ ├── chunked_pipeline_request.phpt
│ ├── client_ca.phpt
│ ├── co_switching.phpt
│ ├── compression.phpt
│ ├── compression_min_length.phpt
│ ├── compression_types.phpt
│ ├── cookieAlias.phpt
│ ├── cookie_delete.phpt
│ ├── cookie_samesite.phpt
│ ├── cookie_vs_rawcookie.phpt
│ ├── cookies.phpt
│ ├── cookies_parse.phpt
│ ├── create_request.phpt
│ ├── data_parse.phpt
│ ├── disable_compression.phpt
│ ├── disable_coroutine.phpt
│ ├── dispatch_mode_7.phpt
│ ├── duplicate_header.phpt
│ ├── enable_coroutine.phpt
│ ├── error_1203.phpt
│ ├── error_413.phpt
│ ├── event_stream.phpt
│ ├── form_data_1.phpt
│ ├── form_data_with_charset.phpt
│ ├── head_method.phpt
│ ├── headers_sent.phpt
│ ├── headers_sent_coroutine.phpt
│ ├── http_autoindex.phpt
│ ├── http_index_files.phpt
│ ├── http_index_files_autoindex.phpt
│ ├── https.phpt
│ ├── issue_2360.phpt
│ ├── json_encode.phpt
│ ├── json_encode2.phpt
│ ├── large_url.phpt
│ ├── max-age.phpt
│ ├── max_concurrency.phpt
│ ├── max_coro_num.phpt
│ ├── max_input_vars.phpt
│ ├── mixed_server.phpt
│ ├── new_cookie.phpt
│ ├── no_compression.phpt
│ ├── numeric_header_name.phpt
│ ├── objectCookie.phpt
│ ├── objectCookieMemory.phpt
│ ├── octane_bug_651.phpt
│ ├── pipeline.phpt
│ ├── post.phpt
│ ├── purge_method.phpt
│ ├── range.phpt
│ ├── range2.phpt
│ ├── rawContent.phpt
│ ├── rawCookie.phpt
│ ├── redirect.phpt
│ ├── reset_concurrency_with_base.phpt
│ ├── reset_concurrency_with_process.phpt
│ ├── response_create.phpt
│ ├── send_500_to_client.phpt
│ ├── send_empty_file.phpt
│ ├── send_yield.phpt
│ ├── sendfile.phpt
│ ├── sendfile_client_reset.phpt
│ ├── sendfile_dir.phpt
│ ├── sendfile_link.phpt
│ ├── sendfile_no_keepalive.phpt
│ ├── sendfile_with_dispatch_mode_7.phpt
│ ├── sendfile_with_ssl.phpt
│ ├── set_content_length.phpt
│ ├── shutdown_in_event_worker.phpt
│ ├── shutdown_in_task_worker.phpt
│ ├── slow_client.phpt
│ ├── slow_large_post.phpt
│ ├── sni
│ │ └── server.phpt
│ ├── static_handler.phpt
│ ├── static_handler
│ │ ├── locations.phpt
│ │ ├── mimetype_not_exists.phpt
│ │ ├── read_link_2.phpt
│ │ ├── read_link_file.phpt
│ │ ├── relative_path.phpt
│ │ ├── relative_path_2.phpt
│ │ ├── relative_path_3.phpt
│ │ └── urldecode.phpt
│ ├── task
│ │ ├── enable_coroutine.phpt
│ │ ├── enable_coroutine_with_wrong_usage.phpt
│ │ └── use_object.phpt
│ ├── tmp-content-type.phpt
│ ├── too_many_special_chars_in_cookie.phpt
│ ├── trailer.phpt
│ ├── unixsocket.phpt
│ ├── unixsocket2.phpt
│ ├── unset_response_header.phpt
│ ├── upload.phpt
│ ├── upload4.phpt
│ ├── uploadFile.phpt
│ ├── upload_02.phpt
│ ├── upload_03.phpt
│ ├── upload_big_file.phpt
│ ├── upload_file_array_default.phpt
│ ├── upload_file_array_parsed.phpt
│ ├── upload_file_empty.phpt
│ ├── upload_max_filesize.phpt
│ ├── worker_max_concurrency.phpt
│ └── zstd.phpt
├── swoole_http_server_coro
│ ├── bad_request.phpt
│ ├── bug_2682.phpt
│ ├── bug_3025.phpt
│ ├── bug_4519.phpt
│ ├── bug_no_handle.phpt
│ ├── check_cookie_crlf.phpt
│ ├── check_http_header_crlf.phpt
│ ├── chunked_pipeline_request.phpt
│ ├── close_socket.phpt
│ ├── compression_min_length.phpt
│ ├── compression_types.phpt
│ ├── create_response.phpt
│ ├── create_response_2.phpt
│ ├── error_404.phpt
│ ├── error_413.phpt
│ ├── form_data_1.phpt
│ ├── form_data_2.phpt
│ ├── graceful_shutdown.phpt
│ ├── handle.phpt
│ ├── http2.phpt
│ ├── https.phpt
│ ├── ipv6.phpt
│ ├── keepalive.phpt
│ ├── pipeline.phpt
│ ├── post_array.phpt
│ ├── random_port.phpt
│ ├── rawContent_get_big_data.phpt
│ ├── remote_addr.phpt
│ ├── restart.phpt
│ ├── reuse_port.phpt
│ ├── sendfile.phpt
│ ├── slow_client.phpt
│ ├── slow_large_post.phpt
│ ├── ssl_bad_client.phpt
│ ├── tcp_nodelay.phpt
│ ├── upload.phpt
│ ├── websocket.phpt
│ ├── websocket_close.phpt
│ ├── websocket_compression.phpt
│ ├── websocket_mixed.phpt
│ └── websocket_ping_pong.phpt
├── swoole_iouring
│ ├── mix.phpt
│ └── setting.phpt
├── swoole_library
│ ├── array_object
│ │ └── base.phpt
│ ├── database
│ │ ├── mysqli.phpt
│ │ ├── pdo.phpt
│ │ └── redis.phpt
│ ├── exec
│ │ ├── exec
│ │ │ ├── 1.phpt
│ │ │ └── 2.phpt
│ │ └── shell_exec
│ │ │ └── 1.phpt
│ ├── multibyte_string_object
│ │ └── base.phpt
│ ├── name_resolver
│ │ ├── 1.phpt
│ │ └── lookup.phpt
│ ├── string_object
│ │ └── base.phpt
│ └── wait_group
│ │ ├── normal.phpt
│ │ └── timeout.phpt
├── swoole_lock
│ ├── lockwait_twice.phpt
│ ├── mutex.phpt
│ └── mutex_robust.phpt
├── swoole_pdo_odbc
│ ├── base.phpt
│ ├── blocking.phpt
│ ├── query.phpt
│ ├── race.phpt
│ ├── server_info.phpt
│ ├── sleep.phpt
│ └── transaction.phpt
├── swoole_pdo_oracle
│ ├── bug41996.phpt
│ ├── bug44301.phpt
│ ├── bug46274.phpt
│ ├── bug46274_2.phpt
│ ├── bug54379.phpt
│ ├── bug57702.phpt
│ ├── bug60994.phpt
│ ├── bug_33707.phpt
│ ├── checkliveness.phpt
│ ├── coroutint.phpt
│ ├── oci_success_with_info.phpt
│ ├── pdo_oci_attr_action.phpt
│ ├── pdo_oci_attr_autocommit_1.phpt
│ ├── pdo_oci_attr_autocommit_2.phpt
│ ├── pdo_oci_attr_autocommit_3.phpt
│ ├── pdo_oci_attr_call_timeout.phpt
│ ├── pdo_oci_attr_case.phpt
│ ├── pdo_oci_attr_client.phpt
│ ├── pdo_oci_attr_client_identifier.phpt
│ ├── pdo_oci_attr_client_info.phpt
│ ├── pdo_oci_attr_drivername.phpt
│ ├── pdo_oci_attr_module.phpt
│ ├── pdo_oci_attr_nulls_1.phpt
│ ├── pdo_oci_attr_prefetch_1.phpt
│ ├── pdo_oci_attr_prefetch_2.phpt
│ ├── pdo_oci_attr_server.phpt
│ ├── pdo_oci_class_constants.phpt
│ ├── pdo_oci_debugdumpparams.phpt
│ ├── pdo_oci_fread_1.phpt
│ ├── pdo_oci_phpinfo.phpt
│ ├── pdo_oci_quote1.phpt
│ ├── pdo_oci_stmt_getcolumnmeta.phpt
│ ├── pdo_oci_stream_1.phpt
│ ├── pdo_oci_stream_2.phpt
│ ├── pdo_oci_templob_1.phpt
│ ├── pdo_oracle.inc
│ ├── pecl_bug_11345.phpt
│ ├── pecl_bug_6364.phpt
│ ├── transcation.phpt
│ └── transcation2.phpt
├── swoole_pdo_pgsql
│ ├── base.phpt
│ ├── blocking.phpt
│ ├── bug_5635.phpt
│ ├── pdo_pgsql.inc
│ ├── query.phpt
│ ├── race.phpt
│ ├── sleep.phpt
│ └── transaction.phpt
├── swoole_pdo_sqlite
│ ├── bug33841.phpt
│ ├── bug35336.phpt
│ ├── bug38334.phpt
│ ├── bug43831.phpt
│ ├── bug44327_2_1.phpt
│ ├── bug44327_2_2.phpt
│ ├── bug44327_3_1.phpt
│ ├── bug44327_3_2.phpt
│ ├── bug46139.phpt
│ ├── bug46542.phpt
│ ├── bug48773.phpt
│ ├── bug50728.phpt
│ ├── bug52487.phpt
│ ├── bug60104.phpt
│ ├── bug66033.phpt
│ ├── bug70221.phpt
│ ├── bug70862.phpt
│ ├── bug70862_1.phpt
│ ├── bug78192_1.phpt
│ ├── bug78192_2.phpt
│ ├── bug79664_1.phpt
│ ├── bug79664_2.phpt
│ ├── bug81740.phpt
│ ├── bug_42589.phpt
│ ├── bug_44159_sqlite_version_1.phpt
│ ├── bug_44159_sqlite_version_2.phpt
│ ├── bug_47769.phpt
│ ├── bug_63916-2.phpt
│ ├── bug_63916_1.phpt
│ ├── bug_63916_2.phpt
│ ├── bug_64705.phpt
│ ├── coroutine.phpt
│ ├── coroutine2.phpt
│ ├── debugdumpparams_001.phpt
│ ├── gc.phpt
│ ├── gh9032.phpt
│ ├── open_basedir.phpt
│ ├── pdo_035.phpt
│ ├── pdo_fetch_func_001.phpt
│ ├── pdo_fetch_func_001_1.phpt
│ ├── pdo_sqlite.inc
│ ├── pdo_sqlite_createaggregate.phpt
│ ├── pdo_sqlite_createaggregate_002.phpt
│ ├── pdo_sqlite_createcollation.phpt
│ ├── pdo_sqlite_createfunction.phpt
│ ├── pdo_sqlite_createfunction_002.phpt
│ ├── pdo_sqlite_createfunction_with_flags.phpt
│ ├── pdo_sqlite_extendederror_attr.phpt
│ ├── pdo_sqlite_filename_uri.phpt
│ ├── pdo_sqlite_get_attribute.phpt
│ ├── pdo_sqlite_lastinsertid.phpt
│ ├── pdo_sqlite_open_flags.phpt
│ ├── pdo_sqlite_statement_getattribute.phpt
│ ├── pdo_sqlite_tostring_exception.phpt
│ └── pdo_sqlite_transaction.phpt
├── swoole_process
│ ├── alarm.phpt
│ ├── close.phpt
│ ├── coro
│ │ ├── ipc.phpt
│ │ ├── set_protocol.phpt
│ │ ├── signal.phpt
│ │ └── start.phpt
│ ├── ctor.phpt
│ ├── daemon.phpt
│ ├── deamon.phpt
│ ├── echo.py
│ ├── enable_coroutine.phpt
│ ├── exception.phpt
│ ├── exec.phpt
│ ├── exit.phpt
│ ├── freeQueue.phpt
│ ├── getaffinity.phpt
│ ├── ignore_sigpipe.phpt
│ ├── ignore_sigpipe_2.phpt
│ ├── kill.phpt
│ ├── msgq_capacity.phpt
│ ├── name.phpt
│ ├── null_callback.phpt
│ ├── pop.phpt
│ ├── priority.phpt
│ ├── priority_error.phpt
│ ├── process_exec.phpt
│ ├── process_msgqueue.phpt
│ ├── process_push.phpt
│ ├── process_select.phpt
│ ├── push.phpt
│ ├── read.phpt
│ ├── redirect.phpt
│ ├── setaffinity.phpt
│ ├── signal.phpt
│ ├── signal_in_manager.phpt
│ ├── signal_in_manager_2.phpt
│ ├── signal_in_manager_3.phpt
│ ├── signal_in_task_worker.phpt
│ ├── signal_twice.phpt
│ ├── start.phpt
│ ├── timeout.phpt
│ ├── useQueue.phpt
│ ├── wait.phpt
│ ├── wait_signal.phpt
│ ├── write.phpt
│ └── write_in_worker.phpt
├── swoole_process_pool
│ ├── bug_2652.phpt
│ ├── create_websocket_server.phpt
│ ├── detach.phpt
│ ├── enable_coroutine.phpt
│ ├── enable_coroutine2.phpt
│ ├── export_socket.phpt
│ ├── getprocess_1.phpt
│ ├── getprocess_2.phpt
│ ├── getprocess_3.phpt
│ ├── getprocess_4.phpt
│ ├── getprocess_5.phpt
│ ├── master_callback.phpt
│ ├── master_pid.phpt
│ ├── max_wait_time.phpt
│ ├── message.phpt
│ ├── message_async.phpt
│ ├── message_bus.phpt
│ ├── message_bus_sync.phpt
│ ├── msgqueue.phpt
│ ├── msgqueue_2.phpt
│ ├── reload.phpt
│ ├── reuse_port.phpt
│ ├── shutdown.phpt
│ ├── socket_coro.phpt
│ ├── start_pool_twice_in_same_process.phpt
│ ├── start_twice.phpt
│ └── worker_exit_1.phpt
├── swoole_redis_server
│ ├── big_packet.phpt
│ ├── empty.phpt
│ ├── format.phpt
│ ├── getHandler.phpt
│ └── nested_map.phpt
├── swoole_runtime
│ ├── accept.phpt
│ ├── accept_timeout.phpt
│ ├── base.phpt
│ ├── bindto.phpt
│ ├── bindto2.phpt
│ ├── block.phpt
│ ├── bug_4657.phpt
│ ├── bug_5104.phpt
│ ├── destruct.phpt
│ ├── enable_crypto.phpt
│ ├── file_hook
│ │ ├── a.inc
│ │ ├── b.inc
│ │ ├── bug_4327.phpt
│ │ ├── bug_ftell_2g.phpt
│ │ ├── bug_scandir.phpt
│ │ ├── fgets.phpt
│ │ ├── flock.phpt
│ │ ├── fread.phpt
│ │ ├── include.phpt
│ │ ├── include_2.phpt
│ │ ├── lock_ex.phpt
│ │ ├── lock_nb_1.phpt
│ │ ├── lock_nb_2.phpt
│ │ ├── lock_sh.phpt
│ │ ├── open_basedir.phpt
│ │ └── read.phpt
│ ├── file_lock
│ │ ├── file_lock_1.phpt
│ │ ├── lock_nb.phpt
│ │ └── lock_sh_1.phpt
│ ├── get_hook_flags.phpt
│ ├── gethostbyname.phpt
│ ├── hook_default.phpt
│ ├── hook_enable_coroutine.phpt
│ ├── hook_set_flags.phpt
│ ├── library.phpt
│ ├── nonblock.phpt
│ ├── out_of_coroutine.phpt
│ ├── pdo.phpt
│ ├── persistent.phpt
│ ├── proc
│ │ ├── 1.phpt
│ │ ├── 2.phpt
│ │ ├── 3.phpt
│ │ ├── 4.phpt
│ │ ├── 5.phpt
│ │ ├── close_after_wait.phpt
│ │ └── proc_open_pipes.inc
│ ├── redis_connect.phpt
│ ├── redis_pconnect.phpt
│ ├── sento.phpt
│ ├── set_hook_flags.phpt
│ ├── sleep.phpt
│ ├── sleep_yield.phpt
│ ├── sockets
│ │ ├── basic
│ │ │ ├── bug46360.phpt
│ │ │ ├── bug49341.phpt
│ │ │ ├── bug63000.phpt
│ │ │ ├── bug76839.phpt
│ │ │ ├── ipv4loop.phpt
│ │ │ ├── ipv6_skipif.inc
│ │ │ ├── ipv6loop.phpt
│ │ │ ├── mcast_helpers.php.inc
│ │ │ ├── mcast_ipv4_recv.phpt
│ │ │ ├── mcast_ipv4_send.phpt
│ │ │ ├── mcast_ipv4_send_error.phpt
│ │ │ ├── mcast_ipv6_recv.phpt
│ │ │ ├── mcast_ipv6_recv_limited.phpt
│ │ │ ├── mcast_ipv6_send.phpt
│ │ │ ├── socket_accept_failure.phpt
│ │ │ ├── socket_bind.phpt
│ │ │ ├── socket_clear_error.phpt
│ │ │ ├── socket_connect_params.phpt
│ │ │ ├── socket_create_listen-nobind.phpt
│ │ │ ├── socket_create_listen.phpt
│ │ │ ├── socket_create_listen_used.phpt
│ │ │ ├── socket_create_pair.phpt
│ │ │ ├── socket_getopt.phpt
│ │ │ ├── socket_getpeername.phpt
│ │ │ ├── socket_getpeername_ipv4loop.phpt
│ │ │ ├── socket_getpeername_ipv6loop.phpt
│ │ │ ├── socket_getsockname.phpt
│ │ │ ├── socket_listen-wrongparams.phpt
│ │ │ ├── socket_read_params.phpt
│ │ │ ├── socket_select-wrongparams-2.phpt
│ │ │ ├── socket_select.phpt
│ │ │ ├── socket_select_error.phpt
│ │ │ ├── socket_sentto_recvfrom_ipv4_udp.phpt
│ │ │ ├── socket_sentto_recvfrom_ipv6_udp.phpt
│ │ │ ├── socket_sentto_recvfrom_unix.phpt
│ │ │ ├── socket_set_block-retval.phpt
│ │ │ ├── socket_set_nonblock-retval.phpt
│ │ │ ├── socket_set_nonblock.phpt
│ │ │ ├── socket_set_option_bindtodevice.phpt
│ │ │ ├── socket_set_option_error_socket_option.phpt
│ │ │ ├── socket_set_option_in6_pktinfo.phpt
│ │ │ ├── socket_set_option_rcvtimeo.phpt
│ │ │ ├── socket_set_option_seolinger.phpt
│ │ │ ├── socket_set_option_sndtimeo.phpt
│ │ │ ├── socket_setopt_basic.phpt
│ │ │ ├── socket_shutdown.phpt
│ │ │ ├── socket_strerror.phpt
│ │ │ └── unixloop.phpt
│ │ ├── error.phpt
│ │ ├── get_name.phpt
│ │ ├── import.phpt
│ │ ├── nonblock.phpt
│ │ ├── socketpair.phpt
│ │ ├── tcp_client.phpt
│ │ ├── tcp_server.phpt
│ │ ├── timeout.phpt
│ │ └── udp.phpt
│ ├── ssl
│ │ ├── capture_peer_cert.phpt
│ │ ├── client.phpt
│ │ ├── enable_crypto.phpt
│ │ ├── local_cert.phpt
│ │ ├── server.phpt
│ │ └── without_key.phpt
│ ├── stdin.phpt
│ ├── stream_context.phpt
│ ├── stream_context_pass_null.phpt
│ ├── stream_copy_to_stream_socket.phpt
│ ├── stream_get_meta_data.phpt
│ ├── stream_select
│ │ ├── base.phpt
│ │ ├── blocked.phpt
│ │ ├── bug46024.phpt
│ │ ├── bug60120.phpt
│ │ ├── bug60602.phpt
│ │ ├── bug64438.phpt
│ │ ├── bug64770.phpt
│ │ ├── bug69521.phpt
│ │ ├── bug72075.phpt
│ │ ├── never_timeout.phpt
│ │ ├── preserve_keys.phpt
│ │ ├── return_val.phpt
│ │ ├── rw_events.phpt
│ │ ├── stream_set_blocking.phpt
│ │ └── timeout.phpt
│ ├── stream_socket_pair.phpt
│ ├── tcp-c10k.phpt
│ ├── tcp.phpt
│ ├── udg.phpt
│ ├── udp-c10k.phpt
│ ├── udp.phpt
│ ├── unix.phpt
│ └── unsafe
│ │ └── pcntl_fork.phpt
├── swoole_server
│ ├── accept_zero.phpt
│ ├── addListener.phpt
│ ├── addProcess.phpt
│ ├── addProcess_base.phpt
│ ├── addProcess_with_error.phpt
│ ├── addProcess_with_event_wait.phpt
│ ├── addProcess_with_tick.phpt
│ ├── base
│ │ ├── reload_1.phpt
│ │ ├── reload_2.phpt
│ │ ├── shutdown.phpt
│ │ └── shutdown_single.phpt
│ ├── bigPipeMessage.phpt
│ ├── big_session_id.phpt
│ ├── big_udp_packet.phpt
│ ├── bind.phpt
│ ├── bug_11000_01.phpt
│ ├── bug_1864.phpt
│ ├── bug_2308.phpt
│ ├── bug_2313.phpt
│ ├── bug_2639.phpt
│ ├── bug_2736.phpt
│ ├── bug_aio.phpt
│ ├── check_callback.phpt
│ ├── check_chunk_total_size.phpt
│ ├── client_close_in_writable_event.phpt
│ ├── close_force.phpt
│ ├── close_in_connect_callback.phpt
│ ├── close_in_manager.phpt
│ ├── close_in_master.phpt
│ ├── close_in_non_current_worker.phpt
│ ├── close_in_other_worker_with_base.phpt
│ ├── close_in_task_worker.phpt
│ ├── close_max_fd.phpt
│ ├── close_queued.phpt
│ ├── close_reset.phpt
│ ├── command.phpt
│ ├── connections.phpt
│ ├── discard_timeout_packet.phpt
│ ├── dispatch_fallback.phpt
│ ├── dispatch_func.phpt
│ ├── dispatch_func_discard.phpt
│ ├── dispatch_func_memory_leak.phpt
│ ├── dispatch_mode_1.phpt
│ ├── dispatch_mode_10.phpt
│ ├── dispatch_mode_3.phpt
│ ├── dispatch_mode_7.phpt
│ ├── dispatch_mode_8.phpt
│ ├── dispatch_mode_9.phpt
│ ├── duplicate_registered.phpt
│ ├── enable_coroutine.phpt
│ ├── enable_delay_receive.phpt
│ ├── enable_reuse_port.phpt
│ ├── eof_protocol.phpt
│ ├── eof_server.phpt
│ ├── event
│ │ ├── before_shutdown.phpt
│ │ ├── manager_start.phpt
│ │ ├── manager_stop.phpt
│ │ ├── shutdown.phpt
│ │ ├── start.phpt
│ │ └── worker_exit.phpt
│ ├── exist.phpt
│ ├── force_reload.phpt
│ ├── force_reload2.phpt
│ ├── force_reload3.phpt
│ ├── force_reload4.phpt
│ ├── getCallback.phpt
│ ├── getClientInfo.phpt
│ ├── getClientInfo_in_callback_of_close.phpt
│ ├── getClientInfo_in_callback_of_close_2.phpt
│ ├── getClientList.phpt
│ ├── getLastError.phpt
│ ├── getSocket.phpt
│ ├── getWorkerStatus.phpt
│ ├── heartbeat.phpt
│ ├── heartbeat_true.phpt
│ ├── heartbeat_with_base.phpt
│ ├── http_protocol.phpt
│ ├── idle_worekr_num.phpt
│ ├── invalid_fd.phpt
│ ├── invalid_option.phpt
│ ├── kill_user_process_01.phpt
│ ├── kill_user_process_02.phpt
│ ├── kill_worker_01.phpt
│ ├── kill_worker_02.phpt
│ ├── last_time.phpt
│ ├── length
│ │ ├── 00.phpt
│ │ ├── 01.phpt
│ │ ├── 02.phpt
│ │ ├── 03.phpt
│ │ └── length_func.phpt
│ ├── listen_fail.phpt
│ ├── max_idle_time_1.phpt
│ ├── max_idle_time_2.phpt
│ ├── max_queued_bytes.phpt
│ ├── max_request.phpt
│ ├── max_request_grace_disabled.phpt
│ ├── max_request_grace_enabled.phpt
│ ├── max_request_threshold.phpt
│ ├── memory_leak
│ │ ├── length.phpt
│ │ ├── pipe_message.phpt
│ │ ├── task.phpt
│ │ └── tcp.phpt
│ ├── mqtt
│ │ ├── length_offset.phpt
│ │ ├── recv_fail.phpt
│ │ └── send_big_pack.phpt
│ ├── new_twice.phpt
│ ├── object
│ │ ├── event.phpt
│ │ ├── getManagerPid.phpt
│ │ ├── getMasterPid.phpt
│ │ ├── getWorkerId.phpt
│ │ ├── getWorkerPid.phpt
│ │ ├── packet.phpt
│ │ ├── pipe_message.phpt
│ │ ├── status_info.phpt
│ │ └── task_result.phpt
│ ├── onReload.phpt
│ ├── parse_option_to_size.phpt
│ ├── pid_file.phpt
│ ├── protect.phpt
│ ├── protect_false.phpt
│ ├── reload.phpt
│ ├── reload_async.phpt
│ ├── reload_process.phpt
│ ├── sendMessage_1.phpt
│ ├── sendMessage_2.phpt
│ ├── sendMessage_3.phpt
│ ├── sendMessage_4.phpt
│ ├── sendMessage_in_manager.phpt
│ ├── send_2.phpt
│ ├── send_2m_in_task_worker.phpt
│ ├── send_2m_in_user_process.phpt
│ ├── send_3.phpt
│ ├── send_big_packet.phpt
│ ├── send_in_master.phpt
│ ├── send_in_other_worker_with_base.phpt
│ ├── sendfile.phpt
│ ├── sendfile_02.phpt
│ ├── sendfile_ssl.phpt
│ ├── sendto_timeout.phpt
│ ├── shutdown.phpt
│ ├── shutdown_in_master.phpt
│ ├── shutdown_in_process.phpt
│ ├── shutdown_with_base_mode.phpt
│ ├── sigint_with_base.phpt
│ ├── sigint_with_process.phpt
│ ├── single_thread
│ │ ├── heartbeat.phpt
│ │ ├── large_packet.phpt
│ │ └── user_setting.phpt
│ ├── sleep.phpt
│ ├── slow_client.phpt
│ ├── slow_master.phpt
│ ├── slow_worker.phpt
│ ├── ssl
│ │ ├── 00.phpt
│ │ ├── bad_client.phpt
│ │ ├── code
│ │ │ ├── client.go
│ │ │ └── client.js
│ │ ├── dtls.phpt
│ │ ├── dtls_big_packet.phpt
│ │ ├── dtls_with_length_protocol.phpt
│ │ ├── golang.phpt
│ │ ├── heartbeat_1.phpt
│ │ ├── heartbeat_2.phpt
│ │ ├── nodejs.phpt
│ │ ├── ssl_send_wait.phpt
│ │ ├── verify_01.phpt
│ │ ├── verify_02.phpt
│ │ └── verify_03.phpt
│ ├── start_twice.phpt
│ ├── stats.phpt
│ ├── stats_file.phpt
│ ├── stats_file_json.phpt
│ ├── stats_file_php.phpt
│ ├── stop.phpt
│ ├── stop_in_workerStart.phpt
│ ├── systemd_fds.phpt
│ ├── task
│ │ ├── base.phpt
│ │ ├── bug_2585.phpt
│ │ ├── callback_is_null.phpt
│ │ ├── enable_coroutine.phpt
│ │ ├── finish_timeout.phpt
│ │ ├── huge_data.phpt
│ │ ├── idle_worekr_num.phpt
│ │ ├── invalid_packet.phpt
│ │ ├── kill_01.phpt
│ │ ├── kill_02.phpt
│ │ ├── kill_task_worker_02.phpt
│ │ ├── scheduler_warning.phpt
│ │ ├── task_callback.phpt
│ │ ├── task_co.phpt
│ │ ├── task_enable_coroutine.phpt
│ │ ├── task_enable_coroutine_return.phpt
│ │ ├── task_in_manager.phpt
│ │ ├── task_in_master.phpt
│ │ ├── task_in_task_worker.phpt
│ │ ├── task_in_user_process.phpt
│ │ ├── task_ipc_mode_2.phpt
│ │ ├── task_ipc_mode_3.phpt
│ │ ├── task_max_request.phpt
│ │ ├── task_pack.phpt
│ │ ├── task_queue.phpt
│ │ ├── task_wait.phpt
│ │ ├── timer.phpt
│ │ ├── unpack.phpt
│ │ └── without_onfinish.phpt
│ ├── taskWaitMulti.phpt
│ ├── taskwait_01.phpt
│ ├── taskwait_02.phpt
│ ├── unregistered_signal.phpt
│ ├── unsock_dgram.phpt
│ ├── unsock_stream.phpt
│ ├── user_process.phpt
│ ├── user_process_2.phpt
│ ├── user_process_force_exit.phpt
│ ├── user_process_pid.phpt
│ ├── wrong_eof_setting.phpt
│ └── z_conn_10k.phpt
├── swoole_server_coro
│ ├── length_1.phpt
│ ├── random_port.phpt
│ ├── reuse_port.phpt
│ ├── ssl.phpt
│ └── tcp.phpt
├── swoole_server_port
│ ├── connections.phpt
│ ├── duplicate_registered.phpt
│ ├── heartbeat_1.phpt
│ ├── heartbeat_2.phpt
│ ├── heartbeat_3.phpt
│ ├── http.phpt
│ ├── multi_port.phpt
│ ├── sub_handshake.phpt
│ └── tcp_eof.phpt
├── swoole_socket_coro
│ ├── accept.phpt
│ ├── all.phpt
│ ├── cancel.phpt
│ ├── check_writev_readv_param_type.phpt
│ ├── closed.phpt
│ ├── complete_test.phpt
│ ├── concurrency.phpt
│ ├── construct_parse_args_failed.phpt
│ ├── fd.phpt
│ ├── getBoundCid.phpt
│ ├── getopt
│ │ ├── get.phpt
│ │ └── tcpinfo.phpt
│ ├── getpeername.phpt
│ ├── getsockname.phpt
│ ├── icmp.phpt
│ ├── import_1.phpt
│ ├── import_2.phpt
│ ├── import_3.phpt
│ ├── import_4.phpt
│ ├── import_5.phpt
│ ├── iov_max.phpt
│ ├── peek_and_checkLiveness.phpt
│ ├── protocol
│ │ ├── bug_3586.phpt
│ │ └── package_length_func.phpt
│ ├── readVectorAll.phpt
│ ├── readVectorAll_ssl.phpt
│ ├── readVector_ssl.phpt
│ ├── readVector_ssl_eagain.phpt
│ ├── readv.phpt
│ ├── readv_eagain.phpt
│ ├── recvAll.phpt
│ ├── recvAll_timeout.phpt
│ ├── recv_bad_packet.phpt
│ ├── recv_line.phpt
│ ├── recv_timeout.phpt
│ ├── recv_with_buffer.phpt
│ ├── reuse.phpt
│ ├── reuse_2.phpt
│ ├── sendfile.phpt
│ ├── sendto.phpt
│ ├── sendto_big.phpt
│ ├── sendto_large_packet.phpt
│ ├── server_accept.phpt
│ ├── setopt
│ │ ├── bindtodevice.phpt
│ │ ├── ipv6_pktinfo.phpt
│ │ ├── multicast.phpt
│ │ ├── recvtimeo.phpt
│ │ └── reuse.phpt
│ ├── shutdown.phpt
│ ├── ssl.phpt
│ ├── ssl_bad_server.phpt
│ ├── tcp-c10k.phpt
│ ├── ulimit.phpt
│ ├── unix_dgram.phpt
│ ├── unix_stream.phpt
│ ├── writeVectorAll.phpt
│ ├── writeVectorAll_ssl.phpt
│ ├── writeVector_ssl.phpt
│ ├── writeVector_ssl_eagain.phpt
│ ├── writev.phpt
│ └── writev_eagain.phpt
├── swoole_table
│ ├── big_size.phpt
│ ├── bug_2263.phpt
│ ├── bug_2290.phpt
│ ├── create_10k_object.phpt
│ ├── del.phpt
│ ├── force_unlock.phpt
│ ├── foreach.phpt
│ ├── getMemorySize_1.phpt
│ ├── get_after_destroy.phpt
│ ├── get_before_create.phpt
│ ├── gh-5789.phpt
│ ├── incr_after_del.phpt
│ ├── int.phpt
│ ├── key_value.phpt
│ ├── negative.phpt
│ ├── random_bytes.phpt
│ ├── set_after_del.phpt
│ ├── stats.phpt
│ └── type_conv.phpt
├── swoole_thread
│ ├── add_update.phpt
│ ├── affinity.phpt
│ ├── arraylist.phpt
│ ├── async-io.phpt
│ ├── atomic_ctor.phpt
│ ├── barrier.phpt
│ ├── co-stream.phpt
│ ├── empty_args.phpt
│ ├── exit.phpt
│ ├── fatal_error_1.inc
│ ├── fatal_error_1.phpt
│ ├── fatal_error_2.inc
│ ├── fatal_error_2.phpt
│ ├── fatal_error_3.phpt
│ ├── incr.phpt
│ ├── info.phpt
│ ├── lock.phpt
│ ├── map.phpt
│ ├── map2array.phpt
│ ├── name.phpt
│ ├── numeric_strkey.phpt
│ ├── php_socket.phpt
│ ├── pipe.phpt
│ ├── priority.phpt
│ ├── putenv.phpt
│ ├── queue.phpt
│ ├── queue_notify_all.phpt
│ ├── server
│ │ ├── base.phpt
│ │ ├── bug_5662.phpt
│ │ ├── bug_5694.phpt
│ │ ├── create_response.phpt
│ │ ├── exit.phpt
│ │ ├── fatal_error.phpt
│ │ ├── functions.inc
│ │ ├── heartbeat.phpt
│ │ ├── hook_flags.phpt
│ │ ├── listen.phpt
│ │ ├── manager_timer.phpt
│ │ ├── reload.phpt
│ │ ├── reload_task_workers.phpt
│ │ ├── reload_task_workers_async.phpt
│ │ ├── reset_concurrency.phpt
│ │ ├── send_in_user_process.phpt
│ │ ├── send_large_packet.phpt
│ │ ├── setting.phpt
│ │ ├── stop_worker.phpt
│ │ ├── udp_port.phpt
│ │ └── websocket.phpt
│ ├── shell_exec.phpt
│ ├── signal.phpt
│ ├── sort.phpt
│ ├── stdio.phpt
│ ├── stream.phpt
│ ├── stream_arg.phpt
│ ├── thread_status.phpt
│ └── yield.phpt
├── swoole_timer
│ ├── after.phpt
│ ├── after_fork.phpt
│ ├── bug_2342.phpt
│ ├── bug_4794.phpt
│ ├── bug_4794_2.phpt
│ ├── bug_4794_3.phpt
│ ├── bug_4794_4.phpt
│ ├── bug_4794_5.phpt
│ ├── bug_4794_6.phpt
│ ├── bug_4794_7.phpt
│ ├── bug_4794_8.phpt
│ ├── call_private.phpt
│ ├── callback_bug_with_array.phpt
│ ├── clearAll.phpt
│ ├── enable_coroutine.phpt
│ ├── enable_coroutine2.phpt
│ ├── function_alias.phpt
│ ├── greater_than_0.phpt
│ ├── info.phpt
│ ├── list.phpt
│ ├── manager.phpt
│ ├── master.phpt
│ ├── master_base.phpt
│ ├── memory.phpt
│ ├── next_round.phpt
│ ├── not_exist.phpt
│ ├── reinit_1.phpt
│ ├── reinit_2.phpt
│ ├── stats.phpt
│ ├── swoole_timer_list_alias.phpt
│ ├── task_worker.phpt
│ ├── task_worker_tick_1k.phpt
│ └── verify.phpt
├── swoole_websocket_server
│ ├── bug_1.phpt
│ ├── close_frame_flag.phpt
│ ├── close_frame_full.phpt
│ ├── compression.phpt
│ ├── disconnect.phpt
│ ├── disconnect_with_code.phpt
│ ├── dynamic_property.phpt
│ ├── empty_message.phpt
│ ├── exists_and_isEstablished.phpt
│ ├── fin.phpt
│ ├── fin2.phpt
│ ├── get_large_requests.phpt
│ ├── get_small_requests.phpt
│ ├── greeter.phpt
│ ├── header_token.phpt
│ ├── listener.phpt
│ ├── malformed_data.phpt
│ ├── memory.phpt
│ ├── message_size.phpt
│ ├── onDisconnct.phpt
│ ├── pack.phpt
│ ├── pingloop.phpt
│ ├── pingloop_open_ping_pong_frame.phpt
│ ├── pingpong.phpt
│ ├── pingpong_open_ping_pong_frame.phpt
│ ├── query.phpt
│ ├── recv_decode.phpt
│ ├── send_encode.phpt
│ ├── send_encode_async.phpt
│ ├── set_cookie_on_before_handshake_response.phpt
│ ├── set_cookie_on_handshake.phpt
│ └── websocket_compress_on_handshake.phpt
├── template
└── test.sql
├── thirdparty
├── boost
│ └── asm
│ │ ├── LICENSE
│ │ ├── combined.S
│ │ ├── jump_arm64_aapcs_elf_gas.S
│ │ ├── jump_arm64_aapcs_macho_gas.S
│ │ ├── jump_combined_sysv_macho_gas.S
│ │ ├── jump_loongarch64_sysv_elf_gas.S
│ │ ├── jump_mips64_n64_elf_gas.S
│ │ ├── jump_ppc64_sysv_elf_gas.S
│ │ ├── jump_ppc64_sysv_macho_gas.S
│ │ ├── jump_ppc64_sysv_xcoff_gas.S
│ │ ├── jump_riscv64_sysv_elf_gas.S
│ │ ├── jump_sparc64_sysv_elf_gas.S
│ │ ├── jump_x86_64_sysv_elf_gas.S
│ │ ├── jump_x86_64_sysv_macho_gas.S
│ │ ├── make_arm64_aapcs_elf_gas.S
│ │ ├── make_arm64_aapcs_macho_gas.S
│ │ ├── make_combined_sysv_macho_gas.S
│ │ ├── make_loongarch64_sysv_elf_gas.S
│ │ ├── make_mips64_n64_elf_gas.S
│ │ ├── make_ppc64_sysv_elf_gas.S
│ │ ├── make_ppc64_sysv_macho_gas.S
│ │ ├── make_ppc64_sysv_xcoff_gas.S
│ │ ├── make_riscv64_sysv_elf_gas.S
│ │ ├── make_sparc64_sysv_elf_gas.S
│ │ ├── make_x86_64_sysv_elf_gas.S
│ │ └── make_x86_64_sysv_macho_gas.S
├── hiredis
│ ├── CHANGELOG.md
│ ├── COPYING
│ ├── README.md
│ ├── alloc.c
│ ├── alloc.h
│ ├── fmacros.h
│ ├── hiredis.c
│ ├── hiredis.h
│ ├── net.c
│ ├── net.h
│ ├── read.c
│ ├── read.h
│ ├── sds.c
│ ├── sds.h
│ └── sdsalloc.h
├── multipart_parser.c
├── multipart_parser.h
├── nghttp2
│ ├── COPYING
│ ├── LICENSE
│ ├── nghttp2.h
│ ├── nghttp2_buf.c
│ ├── nghttp2_buf.h
│ ├── nghttp2_hd.c
│ ├── nghttp2_hd.h
│ ├── nghttp2_hd_huffman.c
│ ├── nghttp2_hd_huffman.h
│ ├── nghttp2_hd_huffman_data.c
│ ├── nghttp2_helper.c
│ ├── nghttp2_mem.c
│ ├── nghttp2_mem.h
│ ├── nghttp2_rcbuf.c
│ ├── nghttp2_rcbuf.h
│ └── nghttp2ver.h
├── nlohmann
│ ├── LICENSE.MIT
│ ├── adl_serializer.hpp
│ ├── detail
│ │ ├── conversions
│ │ │ ├── from_json.hpp
│ │ │ ├── to_chars.hpp
│ │ │ └── to_json.hpp
│ │ ├── exceptions.hpp
│ │ ├── input
│ │ │ ├── binary_reader.hpp
│ │ │ ├── input_adapters.hpp
│ │ │ ├── json_sax.hpp
│ │ │ ├── lexer.hpp
│ │ │ ├── parser.hpp
│ │ │ └── position_t.hpp
│ │ ├── iterators
│ │ │ ├── internal_iterator.hpp
│ │ │ ├── iter_impl.hpp
│ │ │ ├── iteration_proxy.hpp
│ │ │ ├── iterator_traits.hpp
│ │ │ ├── json_reverse_iterator.hpp
│ │ │ └── primitive_iterator.hpp
│ │ ├── json_pointer.hpp
│ │ ├── json_ref.hpp
│ │ ├── macro_scope.hpp
│ │ ├── macro_unscope.hpp
│ │ ├── meta
│ │ │ ├── cpp_future.hpp
│ │ │ ├── detected.hpp
│ │ │ ├── is_sax.hpp
│ │ │ ├── type_traits.hpp
│ │ │ └── void_t.hpp
│ │ ├── output
│ │ │ ├── binary_writer.hpp
│ │ │ ├── output_adapters.hpp
│ │ │ └── serializer.hpp
│ │ └── value_t.hpp
│ ├── json.hpp
│ ├── json_fwd.hpp
│ └── thirdparty
│ │ └── hedley
│ │ ├── hedley.hpp
│ │ └── hedley_undef.hpp
├── php
│ ├── LICENSE
│ ├── curl
│ │ ├── curl_arginfo.h
│ │ ├── curl_private.h
│ │ ├── interface.cc
│ │ ├── multi.cc
│ │ └── php_curl.h
│ ├── main
│ │ └── SAPI.h
│ ├── sockets
│ │ ├── conversions.cc
│ │ ├── conversions.h
│ │ ├── multicast.cc
│ │ ├── multicast.h
│ │ ├── php_sockets_cxx.h
│ │ ├── sendrecvmsg.cc
│ │ └── sockaddr_conv.cc
│ ├── standard
│ │ ├── proc_open.cc
│ │ ├── proc_open.h
│ │ └── var_decoder.cc
│ └── streams
│ │ ├── php_streams_int.h
│ │ └── plain_wrapper.c
├── php81
│ ├── pdo_oci
│ │ ├── oci_driver.c
│ │ ├── oci_statement.c
│ │ └── php_pdo_oci_int.h
│ ├── pdo_odbc
│ │ ├── odbc_driver.c
│ │ ├── odbc_stmt.c
│ │ └── php_pdo_odbc_int.h
│ ├── pdo_pgsql
│ │ ├── pgsql_driver.c
│ │ ├── pgsql_driver_arginfo.h
│ │ ├── pgsql_statement.c
│ │ └── php_pdo_pgsql_int.h
│ └── pdo_sqlite
│ │ ├── php_pdo_sqlite_int.h
│ │ ├── sqlite_driver.c
│ │ ├── sqlite_driver.stub.php
│ │ ├── sqlite_driver_arginfo.h
│ │ └── sqlite_statement.c
├── php83
│ ├── pdo_oci
│ │ ├── oci_driver.c
│ │ ├── oci_statement.c
│ │ └── php_pdo_oci_int.h
│ ├── pdo_odbc
│ │ ├── odbc_driver.c
│ │ ├── odbc_stmt.c
│ │ └── php_pdo_odbc_int.h
│ ├── pdo_pgsql
│ │ ├── pgsql_driver.c
│ │ ├── pgsql_driver_arginfo.h
│ │ ├── pgsql_statement.c
│ │ └── php_pdo_pgsql_int.h
│ └── pdo_sqlite
│ │ ├── php_pdo_sqlite_int.h
│ │ ├── sqlite_driver.c
│ │ ├── sqlite_driver.stub.php
│ │ ├── sqlite_driver_arginfo.h
│ │ └── sqlite_statement.c
├── php84
│ ├── curl
│ │ ├── curl_arginfo.h
│ │ ├── curl_private.h
│ │ ├── interface.cc
│ │ ├── multi.cc
│ │ └── php_curl.h
│ ├── pdo_oci
│ │ ├── LICENSE
│ │ ├── oci_driver.c
│ │ ├── oci_statement.c
│ │ └── php_pdo_oci_int.h
│ ├── pdo_odbc
│ │ ├── odbc_driver.c
│ │ ├── odbc_stmt.c
│ │ └── php_pdo_odbc_int.h
│ ├── pdo_pgsql
│ │ ├── pgsql_driver.c
│ │ ├── pgsql_driver_arginfo.h
│ │ ├── pgsql_sql_parser.c
│ │ ├── pgsql_statement.c
│ │ └── php_pdo_pgsql_int.h
│ └── pdo_sqlite
│ │ ├── php_pdo_sqlite_int.h
│ │ ├── sqlite_driver.c
│ │ ├── sqlite_driver.stub.php
│ │ ├── sqlite_driver_arginfo.h
│ │ ├── sqlite_sql_parser.c
│ │ └── sqlite_statement.c
├── swoole_http_parser.c
└── swoole_http_parser.h
└── tools
├── analysis.php
├── arginfo-check.php
├── bootstrap.php
├── build-library.php
├── code-generator.php
├── composer.json
├── constant-generator.php
├── export.php
├── gen-data.php
├── gen-ext-class.php
├── get-ip-info.php
├── next-version.php
├── option-generator.php
├── pecl-package.php
├── phpt-fixer.php
├── rename.php
├── send-http-data.php
├── show-big-files.php
└── templates
├── class.c
└── version.tpl.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | /.github/ export-ignore
2 | /benchmark/ export-ignore
3 | /core-tests/ export-ignore
4 | *.h linguist-language=cpp
5 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | ignore:
2 | - "src/core/error.cc"
3 | - "thirdparty/hiredis/*"
4 |
5 | coverage:
6 | range: 60..80
7 | round: down
8 | precision: 2
9 |
--------------------------------------------------------------------------------
/docs/CODE-STYLE.md:
--------------------------------------------------------------------------------
1 | Code Style
2 | =======
3 | * Google C++ Style
4 | * Indent adjusted to 4 characters
5 | * Line width adjusted to 120 characters
6 |
7 |
--------------------------------------------------------------------------------
/docs/CPPLINT.cfg:
--------------------------------------------------------------------------------
1 | set noparent
2 | filter=-build/include_alpha,-build/include_subdir,-build/include_what_you_use,-legal/copyright,-readability/nolint
3 | braces=4
4 | linelength=120
5 |
--------------------------------------------------------------------------------
/examples/atomic/long.php:
--------------------------------------------------------------------------------
1 | get()."\n";
4 | echo $l->add(20)."\n";
5 | echo $l->sub(20)."\n";
6 | echo $l->sub(-20)."\n";
7 | echo $l->cmpset(-2 ** 36, 0)."\n";
8 | echo $l->cmpset(-2 ** 36 + 20, 0)."\n";
9 |
--------------------------------------------------------------------------------
/examples/atomic/test.php:
--------------------------------------------------------------------------------
1 | add(12)."\n";
4 | echo $atomic->sub(11)."\n";
5 | echo $atomic->cmpset(122, 999)."\n";
6 | echo $atomic->cmpset(124, 999)."\n";
7 | echo $atomic->get()."\n";
8 |
--------------------------------------------------------------------------------
/examples/atomic/wait.php:
--------------------------------------------------------------------------------
1 | 0)
5 | {
6 | echo "master start\n";
7 | $n->wait(1.5);
8 | echo "master end\n";
9 | }
10 | else
11 | {
12 | echo "child start\n";
13 | sleep(1);
14 | $n->wakeup();
15 | echo "child end\n";
16 | }
17 |
--------------------------------------------------------------------------------
/examples/client/long_tcp.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 9501))
6 | {
7 | exit("connect failed\n");
8 | }
9 | $client->send(str_repeat("A", 600));
10 | $data = $client->recv(7000, 0);
11 | if($data === false)
12 | {
13 | echo "recv fail\n";
14 | break;
15 | }
16 | var_dump($data);
17 | $client->close();
18 | }
19 |
--------------------------------------------------------------------------------
/examples/client/recv_1m.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 9509, 60);
5 | $c->send("AAAAAAAAAAAAAAAA");
6 |
7 | $n_bytes = 0;
8 |
9 | while (true)
10 | {
11 | $line = $c->recv();
12 | if ($line === false)
13 | {
14 | echo "recv failed.\n";
15 | break;
16 | }
17 | elseif (empty($line))
18 | {
19 | echo "recv $n_bytes bytes\n";
20 | break;
21 | }
22 | else
23 | {
24 | fwrite($f, $line);
25 | $n_bytes += strlen($line);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/client/simple.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 9501, 0.5, 0);
6 | if (!$ret) {
7 | echo "Over flow. errno=" . $client->errCode;
8 | die("\n");
9 | }
10 | $clients[] = $client;
11 | }
12 | sleep(1);
13 | while (1) {
14 | foreach ($clients as $client) {
15 | $client->send("sss");
16 | $data = $client->recv();
17 | var_dump($data);
18 | }
19 | sleep(1);
20 | }
21 |
--------------------------------------------------------------------------------
/examples/client/test.txt:
--------------------------------------------------------------------------------
1 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
2 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
3 | XXXXXXXXXXXXXXXXXXXXXXx
4 | XXXXXXXXXXXXXXXXXXXXX
5 | XXXXXXXXXXXXXXXXXXXXXXX
6 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
7 | BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
8 | TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
9 | DDDDDDDDDDDDDDDDDDDDDDDDDDD
10 |
--------------------------------------------------------------------------------
/examples/client/udp_sync.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 9502);
4 |
5 | for ($i = 0; $i < 100; $i++)
6 | {
7 | $client->send("admin");
8 | echo $client->recv()."\n";
9 | sleep(1);
10 | }
11 |
--------------------------------------------------------------------------------
/examples/coroutine/behavior/do-while.php:
--------------------------------------------------------------------------------
1 | 2000,
4 | 'death_loop_threshold' => 5,
5 | ]);
6 | echo "start\n";
7 | go(function () {
8 | echo "coro start\n";
9 | do{
10 | echo "111\n";
11 | sleep(1);
12 | } while(1);
13 | });
14 |
15 | go(function () {
16 | echo "222222\n";
17 | });
18 | echo "end\n";
19 |
--------------------------------------------------------------------------------
/examples/coroutine/behavior/foreach.php:
--------------------------------------------------------------------------------
1 | $v){
7 | echo $v."\n";
8 | }
9 | });
10 |
11 | go(function () {
12 | echo "222222\n";
13 | });
14 | echo "end\n";
15 |
--------------------------------------------------------------------------------
/examples/coroutine/behavior/goto.php:
--------------------------------------------------------------------------------
1 | 5000,
4 | ]);
5 | $s = microtime(1);
6 | echo "start\n";
7 |
8 | $flag = 1;
9 | go(function () use (&$flag){
10 | echo "coro 1 start\n";
11 | $i = 0;
12 | while($flag) {
13 | $i ++;
14 | echo "$i\n";
15 | sleep(1);
16 | }
17 | echo "coro 1 can exit\n";
18 | });
19 |
20 | $t = microtime(1);
21 | $u = $t-$s;
22 | echo "use time $u s\n";
23 | go(function () use (&$flag){
24 | echo " coro 2 set flag = false\n";
25 | $flag = false;
26 | });
27 | echo "end\n";
28 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_array_map.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 9501, 1);
15 | echo "co resume : connect ret = ".var_export($res,1)."\n";
16 | echo "map func end \n";
17 | });
18 | }
19 | echo "main end\n";
20 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_call_user.php:
--------------------------------------------------------------------------------
1 | 1]);
4 |
5 | co::create(function() {
6 | echo "co func start\n";
7 | $name = "call_user_func";
8 | $ret = $name("test","test\n");
9 | echo "co func end ret:{$ret}\n";
10 | });
11 |
12 | function test($params)
13 | {
14 | echo "func params:$params";
15 | co::sleep(1);
16 | echo "func end\n";
17 | return "test return\n";
18 | }
19 | echo "main script last\n";
20 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_destruct.php:
--------------------------------------------------------------------------------
1 | test();
28 | echo "end \n";
29 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_empty.php:
--------------------------------------------------------------------------------
1 | 1]);
3 |
4 | co::create(function () {
5 | echo "no coro exit\n";
6 | });
7 | echo "exec file end\n";
8 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_gethost.php:
--------------------------------------------------------------------------------
1 | 1]);
4 |
5 | co::create(function() {
6 |
7 |
8 | $function = new ReflectionFunction('title');
9 |
10 | $function->invoke();
11 | echo "invoke444\n";
12 |
13 | });
14 |
15 | function title() {
16 | echo "333invoke_________________________________\n";
17 | $tcpclient = new Swoole\Coroutine\Client(SWOOLE_SOCK_TCP);
18 | var_dump($tcpclient->connect('127.0.0.1', 9501, 1));
19 |
20 | }
21 |
22 | echo "111\n";
23 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_nested.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 9501, 1);
9 | echo "co[1] connect ret = ".var_export($res,1)."\n";
10 | co::sleep(1);
11 | $res = $client->send("hello world\n");
12 | echo "co[1] send ret = ".var_export($res,1)."\n";
13 | $res = $client->recv();
14 | echo "co[1] recv ret = ".var_export($res,1)."\n";
15 | echo "co[1] exit\n";
16 | });
17 | echo "out coro \n";
18 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_nested_empty.php:
--------------------------------------------------------------------------------
1 | 1024*1024*4]);
5 |
6 | co::create(function () {
7 | var_dump(co::stats());
8 | echo "no coro exit\n";
9 | });
10 | echo "exec file end\n";
11 |
--------------------------------------------------------------------------------
/examples/coroutine/coro_sleep.php:
--------------------------------------------------------------------------------
1 | lock();
8 | Co::sleep(1);
9 | $lock->unlock();
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/examples/coroutine/defer.php:
--------------------------------------------------------------------------------
1 | getMessage(), "\n";
10 | } finally {
11 | echo "First finally.\n";
12 | }
13 | });
14 | echo "exec file end\n";
15 |
--------------------------------------------------------------------------------
/examples/coroutine/exec.php:
--------------------------------------------------------------------------------
1 | getStatus() === 1);
23 | assert($e->getFlags() === SWOOLE_EXIT_IN_COROUTINE);
24 | return;
25 | }
26 | });
27 |
--------------------------------------------------------------------------------
/examples/coroutine/exit_with_status.php:
--------------------------------------------------------------------------------
1 | getStatus();
9 | }
10 | });
11 | Swoole\Event::wait();
12 | exit($exit_status);
13 |
--------------------------------------------------------------------------------
/examples/coroutine/fgets.php:
--------------------------------------------------------------------------------
1 | SWOOLE_TRACE_HTTP2,
4 | 'log_level' => 0,
5 | ]);
6 | Co\run(function () {
7 | $client = new Swoole\Coroutine\Http\Client('www.jd.com', 443, true);
8 | $client->set(['write_func' => function($client, $data) {
9 | var_dump(strlen($data));
10 | }]);
11 | $client->get('/');
12 | var_dump(strlen($client->getBody()));
13 | return 0;
14 | });
15 |
--------------------------------------------------------------------------------
/examples/coroutine/http_client.php:
--------------------------------------------------------------------------------
1 | setHeaders(['Host' => 'localhost']);
6 | $cli->set(['http_proxy_host' => HTTP_PROXY_HOST, 'http_proxy_port' => HTTP_PROXY_PORT]);
7 | $result = $cli->get('/get?json=true');
8 | var_dump($cli->body);
9 | // assert($result);
10 | // $ret = json_decode($cli->body, true);
11 | // assert(is_array($ret) and $ret['json'] == 'true');
12 | });
13 |
--------------------------------------------------------------------------------
/examples/coroutine/http_download.php:
--------------------------------------------------------------------------------
1 | set(['timeout' => -1]);
9 | $cli->setHeaders([
10 | 'Host' => $host,
11 | "User-Agent" => 'Chrome/49.0.2587.3',
12 | 'Accept' => '*',
13 | 'Accept-Encoding' => 'gzip'
14 | ]);
15 | $cli->download('/dist/skin1/images/logo-white.png', '/tmp/logo.png');
16 | });
17 |
--------------------------------------------------------------------------------
/examples/coroutine/list_coroutines.php:
--------------------------------------------------------------------------------
1 | connect([
7 | 'host' => '127.0.0.1',
8 | 'port' => 3306,
9 | 'user' => 'root',
10 | 'password' => 'root',
11 | 'database' => 'test',
12 | ]);
13 | $res = $swoole_mysql->escape("");
14 | var_dump($res);
15 | });
16 |
17 |
--------------------------------------------------------------------------------
/examples/coroutine/mysql_execute_empty.php:
--------------------------------------------------------------------------------
1 | '127.0.0.1',
6 | 'user' => 'root',
7 | 'password' => 'root',
8 | 'database' => 'test'
9 | ];
10 | $db->connect($server);
11 | $stmt = $db->prepare('SELECT * FROM `userinfo`');
12 | $ret = $stmt->execute();
13 | var_dump($ret);
14 | });
15 |
--------------------------------------------------------------------------------
/examples/coroutine/mysql_prepare_2.php:
--------------------------------------------------------------------------------
1 | '127.0.0.1',
9 | 'user' => 'root',
10 | 'password' => 'root',
11 | 'database' => 'test',
12 | );
13 |
14 | echo "connect\n";
15 | $ret1 = $db->connect($server);
16 | var_dump($ret1);
17 |
18 | echo "prepare [1]\n";
19 | $stmt1 = $db->prepare('show tables');
20 | echo "execute\n";
21 | $ret1 = $stmt1->execute([]);
22 | var_dump($ret1);
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/examples/coroutine/mysql_query.php:
--------------------------------------------------------------------------------
1 | 1]);
4 |
5 | co::create(function() {
6 |
7 |
8 | $function = new ReflectionFunction('title');
9 |
10 | $function->invoke();
11 | echo "invoke444\n";
12 |
13 | });
14 |
15 | function title() {
16 | echo "333invoke_________________________________\n";
17 | $tcpclient = new Swoole\Coroutine\Client(SWOOLE_SOCK_TCP);
18 | var_dump($tcpclient->connect('127.0.0.1', 9501, 1));
19 |
20 | }
21 |
22 | echo "111\n";
23 |
24 |
25 | echo "222\n";
26 | co::go();
27 |
--------------------------------------------------------------------------------
/examples/coroutine/mysql_unixsocket.php:
--------------------------------------------------------------------------------
1 | 'unix:/tmp/mysql.sock',
7 | 'user' => 'root',
8 | 'password' => 'root',
9 | 'database' => 'test'
10 | ];
11 | $db->connect($server);
12 | $stmt = $db->prepare('SELECT * FROM `user` WHERE id=?');
13 | $ret = $stmt->execute([1]);
14 | var_dump($ret);
15 | });
16 |
--------------------------------------------------------------------------------
/examples/coroutine/pdo/pdo_persistent.phpt:
--------------------------------------------------------------------------------
1 | true)
7 | );
8 | echo "connected\n";
9 | sleep(30);
10 | echo "sleep 30\n";
11 | $pdo->exec("SELECT sleep(1)");
12 | });
13 |
14 | echo "DONE\n";
15 |
--------------------------------------------------------------------------------
/examples/coroutine/proc_open.php:
--------------------------------------------------------------------------------
1 | array("pipe", "r"),
7 | 1 => array("pipe", "w"),
8 | 2 => array("pipe", "w"),
9 | );
10 |
11 | $process = proc_open('unknown', $descriptorspec, $pipes);
12 |
13 | var_dump($pipes);
14 |
15 | var_dump(fread($pipes[2], 8192));
16 |
17 | $return_value = proc_close($process);
18 |
19 | echo "command returned $return_value\n";
20 | });
--------------------------------------------------------------------------------
/examples/coroutine/redis/auth.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 6379);
5 | $redis->auth('root');
6 | $redis->set('key', 'swoole redis work');
7 | var_dump($redis->get('key'));
8 | });
9 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/eval.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 6379);
5 | $res = $redis->eval("return redis.call('get', 'key')");
6 | var_dump($res);
7 | });
8 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/get.php:
--------------------------------------------------------------------------------
1 | connect("127.0.0.1", 6379));
5 | var_dump($redis->get("key"));
6 | var_dump($redis->set("key_22", str_repeat('A', 8192*256)));
7 | var_dump($redis->mget(["key", "key_22"]));
8 | });
9 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/multi.php:
--------------------------------------------------------------------------------
1 | connect(REDIS_SERVER_HOST, REDIS_SERVER_PORT);
9 | $redis->multi();
10 | $redis->set('key3', 'rango');
11 | $redis->get('key1');
12 | $redis->get('key2');
13 | $redis->get('key3');
14 |
15 | $result = $redis->exec();
16 | var_dump($result);
17 | });
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/pipeline.php:
--------------------------------------------------------------------------------
1 | connect(REDIS_SERVER_HOST, REDIS_SERVER_PORT);
9 | $redis->setDefer();
10 | $redis->set('key1', 'value');
11 | $redis->get('key1');
12 |
13 | $result1 = $redis->recv();
14 | $result2 = $redis->recv();
15 |
16 | var_dump($result1, $result2);
17 | });
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/pub.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 6379);
6 | while (true)
7 | {
8 | $msg = $redis->publish('msg_1', 'hello-' . $i++);
9 | var_dump($msg);
10 | co::sleep(1);
11 | }
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/request.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 6379);
5 | $res = $redis->request(['object', 'encoding', 'key1']);
6 | var_dump($res);
7 | });
8 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/serialize.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 6379, true); // param3 is serialize
6 | $redis->set('foo', ['bar' => 'baz']);
7 | $ret = $redis->get('foo');
8 | var_dump($ret);
9 | });
10 |
--------------------------------------------------------------------------------
/examples/coroutine/redis/sub.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 6379);
5 | $msg = $redis->subscribe(array("msg_1"));
6 | while ($msg = $redis->recv())
7 | {
8 | var_dump($msg);
9 | }
10 | });
11 |
12 | go(function () {
13 | $redis = new Swoole\Coroutine\Redis();
14 | $redis->connect('127.0.0.1', 6379);
15 | $msg = $redis->subscribe(array("msg_2"));
16 | while ($msg = $redis->recv())
17 | {
18 | var_dump($msg);
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/examples/coroutine/redis_subscribe.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 6379);
8 | while (true)
9 | {
10 | $val = $redis->subscribe(['test']);
11 | //订阅的channel,以第一次调用subscribe时的channel为准,后续的subscribe调用是为了收取Redis Server的回包
12 | //如果需要改变订阅的channel,请close掉连接,再调用subscribe
13 | var_dump($val);
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/examples/coroutine/scheduler.php:
--------------------------------------------------------------------------------
1 | pop();
10 | echo "pop [#$i] ret:".var_export($ret,1)."\n";
11 | }
12 | });
13 |
14 | go(function () use ($c1,$num) {
15 | echo "push start\n";
16 | for ($i=0;$i<$num;$i++)
17 | {
18 | $ret = $c1->push("data-$i");
19 | echo "push [#$i] ret:".var_export($ret,1)."\n";
20 | }
21 |
22 | });
23 | echo "main end\n";
24 |
--------------------------------------------------------------------------------
/examples/coroutine/select/4.php:
--------------------------------------------------------------------------------
1 | push("data-$i");
10 | echo "push [#$i] ret:".var_export($ret,1)."\n";
11 | }
12 | });
13 |
14 | go(function () use ($c1, $num) {
15 | echo "pop start\n";
16 | for ($i=0;$i<$num;$i++)
17 | {
18 | $ret = $c1->pop();
19 | echo "pop [#$i] ret:".var_export($ret,1)."\n";
20 | }
21 | });
22 | echo "main end\n";
23 |
--------------------------------------------------------------------------------
/examples/coroutine/select/9.php:
--------------------------------------------------------------------------------
1 | push("chan1-$i");
9 | echo "chan push [#$i] ret:".var_export($ret,1)."\n";
10 | }
11 | });
12 |
13 | go(function () use ($c1) {
14 | $ret = $c1->pop();
15 | echo "chan pop ret:".var_export($ret,1)."\n";
16 | co::sleep(1);
17 | $ret = $c1->pop();
18 | echo "chan pop ret:".var_export($ret,1)."\n";
19 | });
20 |
--------------------------------------------------------------------------------
/examples/coroutine/select/poptimeout.php:
--------------------------------------------------------------------------------
1 | pop(1);
9 | $end = microtime(1);
10 | echo "chan pop ret:".var_export($ret,1)." error:".$c1->errCode."\n";
11 | echo "use time:".($end-$start)."s\n";
12 |
13 | });
14 |
15 | go(function () use ($c1) {
16 | co::sleep(2);
17 | echo "sleep 2\n";
18 | $ret = $c1->push("chan-1");
19 | echo "chan push ret:".var_export($ret,1)." error:".$c1->errCode."\n";
20 | });
21 |
--------------------------------------------------------------------------------
/examples/coroutine/select/test.php:
--------------------------------------------------------------------------------
1 | push($i);
9 | echo "push {$i} res:".var_export($ret, 1)."\n";
10 | });
11 | };
12 | go(function ()use ($chan){
13 | $bool = true;
14 | while ($bool){
15 | $data = $chan->pop();
16 | echo "pop res:".var_export($data, 1)."\n";
17 | if($data===false){
18 | $bool = false;
19 | }
20 | //var_dump($data);
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/examples/coroutine/server/tcp.php:
--------------------------------------------------------------------------------
1 | handle(function (Connection $conn) {
10 | while (true) {
11 |
12 | $data = $conn->recv();
13 | if (!$data) {
14 | break;
15 | }
16 | $conn->send("hello $data");
17 | }
18 | $conn->close();
19 | });
20 |
21 | $server->start();
22 | });
23 |
24 | Swoole\Event::wait();
25 |
--------------------------------------------------------------------------------
/examples/coroutine/sleep.php:
--------------------------------------------------------------------------------
1 | set([
5 | 'worker_num' => 1,
6 | ]);
7 |
8 | $server->on('Request', function ($request, $response) {
9 | Swoole\Coroutine::sleep(0.2);
10 | $response->end('Test End');
11 | });
12 |
13 | $server->start();
14 |
--------------------------------------------------------------------------------
/examples/coroutine/socket/accept.php:
--------------------------------------------------------------------------------
1 | bind('127.0.0.1', 9601);
5 | var_dump($ret);
6 | assert($sock->listen(512));
7 | $conn = $sock->accept();
8 |
9 | $data = $conn->recv();
10 | var_dump($data);
11 | $json = json_decode($data, true);
12 | var_dump($json);
13 | $ret = $conn->send("world\n");
14 | echo "send res {$ret} \n";
15 | $conn->close();
16 | });
17 |
--------------------------------------------------------------------------------
/examples/coroutine/socket/sendto.php:
--------------------------------------------------------------------------------
1 | connect('127.0.0.1', 9601);
7 | echo "connect ret:".var_export($ret,1)." error:".var_export($conn->errCode,1)."\n";
8 | $ret = $conn->send(json_encode(['data' => 'hello']));
9 | echo "send ret:".var_export($ret,1)."\n";
10 | echo $conn->recv();
11 | });
12 | echo "end \n";
13 |
--------------------------------------------------------------------------------
/examples/coroutine/stack.php:
--------------------------------------------------------------------------------
1 | 8192*4]);
3 |
4 | function test($n)
5 | {
6 | $a = 1;
7 | $b = 2;
8 | $c = 3;
9 | $d = 4;
10 | static $i;
11 |
12 | usleep(100000);
13 | echo "index=".($i++)."\n";
14 |
15 | return test($n + $a + $b + $c + $d);
16 | }
17 |
18 | go(function () {
19 | test(9);
20 | });
21 |
--------------------------------------------------------------------------------
/examples/coroutine/stack/2.php:
--------------------------------------------------------------------------------
1 | set(array(
4 | 'worker_num' => 1, //工作进程数量
5 | 'daemonize' => true, //是否作为守护进程
6 | ));
7 | $serv->on('connect', function ($serv, $fd){
8 | echo "Client:Connect.\n";
9 | });
10 | $serv->on('receive', function ($serv, $fd, $reactor_id, $data) {
11 | $serv->send($fd, 'Swoole: '.$data);
12 | $serv->close($fd);
13 | });
14 | $serv->on('close', function ($serv, $fd) {
15 | echo "Client: Close.\n";
16 | });
17 | $serv->start();
18 |
--------------------------------------------------------------------------------
/examples/coroutine/timer_test.php:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * @Author: winterswang
4 | * @Date: 2016-06-26 16:34:02
5 | * @Last Modified by: winterswang
6 | * @Last Modified time: 2016-06-26 16:41:46
7 | */
8 |
9 | Swoole\Timer::after(1000, function(){
10 | echo " timer after timeout\n";
11 | });
12 |
13 | Swoole\Timer::tick(1000, function(){
14 | echo "timer tick timeout\n";
15 | });
16 | ?>
17 |
--------------------------------------------------------------------------------
/examples/coroutine/util/resume001.php:
--------------------------------------------------------------------------------
1 | set(['worker_num' => 8, ]);
5 |
6 | $http->on("start", function ($server) {
7 | echo "Swoole http server is started at http://127.0.0.1:9501\n";
8 | });
9 |
10 | $http->on("request", function ($request, $response) {
11 | sleep(1);
12 | $response->end("Hello World\n");
13 | });
14 |
15 | $http->start();
16 |
--------------------------------------------------------------------------------
/examples/dtls/client.php:
--------------------------------------------------------------------------------
1 | connect("127.0.0.1", 9905);
8 | echo "connect OK\n";
9 | $client->send("hello world");
10 | echo $client->recv();
11 | $client->close();
12 | echo "END\n";
13 | }
14 | );
--------------------------------------------------------------------------------
/examples/event/cycle.php:
--------------------------------------------------------------------------------
1 | \n");
5 | }
6 | fwrite($fp, "HELLO world");
7 |
8 | function stream_onRead($fp)
9 | {
10 | echo fread($fp, 1024)."\n";
11 | sleep(1);
12 | Swoole\Event::write($fp, "hello world");
13 | //Swoole\Event::set($fp, null, null, SWOOLE_EVENT_READ | SWOOLE_EVENT_WRITE);
14 | //Swoole\Event::del($fp);
15 | //fclose($fp);
16 | }
17 |
18 |
19 | Swoole\Event::add($fp, 'stream_onRead');
20 |
21 | echo "start\n";
22 | Swoole\Event::wait();
23 |
--------------------------------------------------------------------------------
/examples/event/test.php:
--------------------------------------------------------------------------------
1 | on('request', function ($req, Swoole\Http\Response $resp) use ($http) {
6 | if ($req->server['request_uri'] == '/') {
7 | $resp->header('Content-Encoding', '');
8 | $resp->end(str_repeat('A', 1024));
9 | } elseif ($req->server['request_uri'] == '/gzip') {
10 | $resp->end(str_repeat('A', 1024));
11 | } else {
12 | $resp->status(404);
13 | $resp->end();
14 | }
15 | });
16 |
17 | $http->start();
18 |
--------------------------------------------------------------------------------
/examples/http/post.data:
--------------------------------------------------------------------------------
1 | dd=wwwwww&ddd=eee&3412=3234&hello=world%2C+i+am+rango%2C+thank+you.+no+body
2 |
--------------------------------------------------------------------------------
/examples/http/raw.php:
--------------------------------------------------------------------------------
1 | on('request', function ($req, Swoole\Http\Response $resp) {
5 | $resp->redirect("http://www.baidu.com/", 301);
6 | });
7 |
8 | $http->start();
9 |
--------------------------------------------------------------------------------
/examples/http/static_handler.php:
--------------------------------------------------------------------------------
1 | set([
5 | 'enable_static_handler' => true,
6 | 'http_autoindex' => true,
7 | 'document_root' => realpath(__DIR__.'/../www/'),
8 | ]);
9 |
10 | $http->on('request', function ($req, $resp) {
11 | $resp->end("hello world\n");
12 | });
13 |
14 | $http->start();
15 |
--------------------------------------------------------------------------------
/examples/http/test.txt:
--------------------------------------------------------------------------------
1 | hello world!
2 |
--------------------------------------------------------------------------------
/examples/http2/streaming.php:
--------------------------------------------------------------------------------
1 | set([
5 | 'open_http2_protocol' => 1,
6 | ]);
7 |
8 | /**
9 | * nghttp -v http://localhost:9501
10 | */
11 | $http->on('request', function (Swoole\Http\Request $request, Swoole\Http\Response $response) {
12 | $n = 5;
13 | while ($n--) {
14 | $response->write("hello world, #$n
\n");
15 | Co\System::sleep(1);
16 | }
17 | $response->end("hello world");
18 | });
19 |
20 | $http->start();
21 |
22 |
--------------------------------------------------------------------------------
/examples/http2/test.html:
--------------------------------------------------------------------------------
1 |