Skip to content

Commit d4854f4

Browse files
Optimize swoole docs (#4666)
1 parent e3c3525 commit d4854f4

File tree

3 files changed

+83
-99
lines changed

3 files changed

+83
-99
lines changed

reference/swoole/book.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
<preface xml:id="intro.swoole">
1111
&reftitle.intro;
1212
<para>
13-
Swoole is a high-performance networking framework using
14-
an event-driven, asynchronous, non-blocking I/O model.
15-
It can be used to develop high-performance, scalable,
16-
concurrent TCP, UDP, Unix socket, HTTP, Websocket services.
13+
Swoole is a parallel network communication engine based on asynchronous event-driven and coroutine,
14+
written in C++, providing coroutine and high-performance network programming support for PHP.
15+
It provides various network server and client modules for multiple communication protocols, making it easy to
16+
quickly implement TCP/UDP services, high-performance Web, WebSocket services, IoT, real-time communication, games,
17+
microservices, etc., breaking the limits of PHP in traditional web domains.
1718

1819
To get started, please check the <link
1920
xlink:href="&url.swoole.docs;">Swoole Docs</link>.

reference/swoole/ini.xml

Lines changed: 43 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -18,58 +18,40 @@
1818
</thead>
1919
<tbody>
2020
<row>
21-
<entry><link linkend="ini.swoole.aio-thread-num">swoole.aio_thread_num</link></entry>
22-
<entry>2</entry>
23-
<entry><constant>INI_ALL</constant></entry>
24-
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
25-
</row>
26-
<row>
27-
<entry><link linkend="ini.swoole.display-errors">swoole.display_errors</link></entry>
21+
<entry><link linkend="ini.swoole.enable-library">swoole.enable_library</link></entry>
2822
<entry>On</entry>
2923
<entry><constant>INI_ALL</constant></entry>
3024
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
3125
</row>
3226
<row>
33-
<entry><link linkend="ini.swoole.fast-serialize">swoole.fast_serialize</link></entry>
27+
<entry><link linkend="ini.swoole.enable-fiber-mock">swoole.enable_fiber_mock</link></entry>
3428
<entry>Off</entry>
3529
<entry><constant>INI_ALL</constant></entry>
3630
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
3731
</row>
3832
<row>
39-
<entry><link linkend="ini.swoole.unixsock-buffer-size">swoole.unixsock_buffer_size</link></entry>
40-
<entry>8388608</entry>
33+
<entry><link linkend="ini.swoole.enable-preemptive-scheduler">swoole.enable_preemptive_scheduler</link></entry>
34+
<entry>Off</entry>
4135
<entry><constant>INI_ALL</constant></entry>
4236
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
4337
</row>
4438
<row>
45-
<entry><link linkend="ini.swoole.use-namespace">swoole.use_namespace</link></entry>
46-
<entry>On</entry>
47-
<entry><constant>INI_SYSTEM</constant></entry>
48-
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
49-
</row>
50-
<row>
51-
<entry><link linkend="ini.swoole.enable-coroutine">swoole.enable_coroutine</link></entry>
39+
<entry><link linkend="ini.swoole.display-errors">swoole.display_errors</link></entry>
5240
<entry>On</entry>
5341
<entry><constant>INI_ALL</constant></entry>
54-
<entry>Available as of swoole 4.0.0</entry>
42+
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
5543
</row>
5644
<row>
5745
<entry><link linkend="ini.swoole.use-shortname">swoole.use_shortname</link></entry>
5846
<entry>On</entry>
59-
<entry><constant>INI_ALL</constant></entry>
60-
<entry>Available as of swoole 4.0.0</entry>
61-
</row>
62-
<row>
63-
<entry><link linkend="ini.swoole.enable-preemptive-scheduler">swoole.enable_preemptive_scheduler</link></entry>
64-
<entry>Off</entry>
65-
<entry><constant>INI_ALL</constant></entry>
66-
<entry>Available as of swoole 4.4.0</entry>
47+
<entry><constant>INI_SYSTEM</constant></entry>
48+
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
6749
</row>
6850
<row>
69-
<entry><link linkend="ini.swoole.enable-library">swoole.enable_library</link></entry>
70-
<entry>On</entry>
51+
<entry><link linkend="ini.swoole.unixsock-buffer-size">swoole.unixsock_buffer_size</link></entry>
52+
<entry>8388608</entry>
7153
<entry><constant>INI_ALL</constant></entry>
72-
<entry>Available as of swoole 4.0.0</entry>
54+
<entry><!-- leave empty, this will be filled by an automatic script --></entry>
7355
</row>
7456
</tbody>
7557
</tgroup>
@@ -80,80 +62,25 @@
8062

8163
<para>
8264
<variablelist>
83-
<varlistentry xml:id="ini.swoole.aio-thread-num">
84-
<term>
85-
<parameter>swoole.aio_thread_num</parameter>
86-
<type>int</type>
87-
</term>
88-
<listitem>
89-
<para>
90-
POSIX asynchronous I/O thread number
91-
</para>
92-
</listitem>
93-
</varlistentry>
94-
<varlistentry xml:id="ini.swoole.display-errors">
95-
<term>
96-
<parameter>swoole.display_errors</parameter>
97-
<type>string</type>
98-
</term>
99-
<listitem>
100-
<para>
101-
This determines whether Swoole errors should be printed to the screen.
102-
</para>
103-
</listitem>
104-
</varlistentry>
105-
<varlistentry xml:id="ini.swoole.fast-serialize">
106-
<term>
107-
<parameter>swoole.fast_serialize</parameter>
108-
<type>string</type>
109-
</term>
110-
<listitem>
111-
<para>
112-
Whether to enable Swoole fast_serialize.
113-
</para>
114-
</listitem>
115-
</varlistentry>
116-
<varlistentry xml:id="ini.swoole.unixsock-buffer-size">
117-
<term>
118-
<parameter>swoole.unixsock_buffer_size</parameter>
119-
<type>int</type>
120-
</term>
121-
<listitem>
122-
<para>
123-
Buffer size of Unix socket.
124-
</para>
125-
</listitem>
126-
</varlistentry>
127-
<varlistentry xml:id="ini.swoole.use-namespace">
128-
<term>
129-
<parameter>swoole.use_namespace</parameter>
130-
<type>string</type>
131-
</term>
132-
<listitem>
133-
<para>
134-
Whether to use PHP namespaces
135-
</para>
136-
</listitem>
137-
</varlistentry>
138-
<varlistentry xml:id="ini.swoole.enable-coroutine">
65+
<varlistentry xml:id="ini.swoole.enable-library">
13966
<term>
140-
<parameter>swoole.enable_coroutine</parameter>
67+
<parameter>swoole.enable_library</parameter>
14168
<type>string</type>
14269
</term>
14370
<listitem>
14471
<para>
145-
Whether to enable coroutine
72+
Enable/disable the extension's built-in library.
14673
</para>
14774
</listitem>
14875
</varlistentry>
149-
<varlistentry xml:id="ini.swoole.use-shortname">
76+
<varlistentry xml:id="ini.swoole.enable-fiber-mock">
15077
<term>
151-
<parameter>swoole.use_shortname</parameter>
78+
<parameter>swoole.enable_fiber_mock</parameter>
15279
<type>string</type>
15380
</term>
15481
<listitem>
15582
<para>
156-
Whether to enable short aliases
83+
Enable/disable use the xdebug extension to debug Swoole programs.
15784
</para>
15885
</listitem>
15986
</varlistentry>
@@ -164,22 +91,43 @@
16491
</term>
16592
<listitem>
16693
<para>
167-
Whether to enable preemptive scheduler
94+
Prevent some coroutines from consuming CPU time for too long in a tight loop (10ms of CPU time), preventing other coroutines from getting scheduled.
16895
</para>
16996
</listitem>
17097
</varlistentry>
171-
<varlistentry xml:id="ini.swoole.enable-library">
98+
<varlistentry xml:id="ini.swoole.display-errors">
17299
<term>
173-
<parameter>swoole.enable_library</parameter>
100+
<parameter>swoole.display_errors</parameter>
174101
<type>string</type>
175102
</term>
176103
<listitem>
177104
<para>
178-
Whether to enable library
105+
Enable/disable displaying Swoole error messages.
106+
</para>
107+
</listitem>
108+
</varlistentry>
109+
<varlistentry xml:id="ini.swoole.use-shortname">
110+
<term>
111+
<parameter>swoole.use_shortname</parameter>
112+
<type>string</type>
113+
</term>
114+
<listitem>
115+
<para>
116+
Enable/disable short aliases.
117+
</para>
118+
</listitem>
119+
</varlistentry>
120+
<varlistentry xml:id="ini.swoole.unixsock-buffer-size">
121+
<term>
122+
<parameter>swoole.unixsock_buffer_size</parameter>
123+
<type>int</type>
124+
</term>
125+
<listitem>
126+
<para>
127+
Set the size of the Socket buffer for inter-process communication.
179128
</para>
180129
</listitem>
181130
</varlistentry>
182-
183131
</variablelist>
184132
</para>
185133
</section>

reference/swoole/setup.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@
44
<chapter xml:id="swoole.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
55
&reftitle.setup;
66

7+
<section xml:id="swoole.requirements">
8+
&reftitle.required;
9+
<para>
10+
Swoole requires the libbrotli library.
11+
</para>
12+
<para>
13+
Enabling --enable-swoole-curl option requires the libcurl library, and both PHP and Swoole must link to the
14+
same libcurl shared library and headers to avoid undefined behavior.
15+
</para>
16+
<para>
17+
Enabling --enable-iouring option requires liburing library (version >= 2.0) and Linux kernel (version >= 5.12).
18+
</para>
19+
<para>
20+
Enabling --enable-swoole-thread option requires PHP to be in ZTS (Zend Thread Safety) mode.
21+
</para>
22+
<para>
23+
Enabling the --enable-cares option requires the libc-ares library.
24+
</para>
25+
<para>
26+
Enabling the --enable-zstd option requires the libzstd library (version >= 1.4.0).
27+
</para>
28+
<para>
29+
Enabling the --enable-swoole-sqlite option requires the libsqlite library.
30+
</para>
31+
<para>
32+
Enabling the --enable-swoole-pgsql option requires the libpq library.
33+
</para>
34+
<para>
35+
Enabling the --with-swoole-odbc option requires the unixodbc-dev library.
36+
</para>
37+
<para>
38+
Enabling the --with-swoole-oracle option requires the Oracle Instant Client libraries.
39+
</para>
40+
</section>
41+
742
<!-- {{{ Installation -->
843
&reference.swoole.configure;
944
<!-- }}} -->

0 commit comments

Comments
 (0)