GEEKDAXUE
首页
分类
标签
排行榜
在线工具
游客
欢迎来到 GEEKDAXUE
立即登录
注册
小鹤
/
Swoole 文档帮助手册教程
Swoole 文档帮助手册教程
语言
中文
·
章节
730
·
阅读
237899
·
收藏
0
·
评论
0
Swoole 文档帮助手册教程
Swoole
开始阅读
收藏
打赏
分享
举报
目录
评论
共
730
个章节 ·
0
条评论
01
Swoole中文文档
02
入门指引
03
环境依赖
04
内核参数调整
05
衍生开源项目
06
框架
07
工具
08
分布式
09
通信协议
10
用户与案例
11
物联网项目
12
网络游戏
13
腾讯(Tencent)
14
百度(Baidu.com)
15
阅文集团
16
BiliBili(哔哩哔哩)
17
车轮互联(chelun.com)
18
(捞月狗) 游戏社区
19
提交错误报告
20
常见问题
21
升级swoole版本的常见问题
22
undefined symbol: __sync_bool_compare_and_swap_4
23
学习Swoole需要掌握哪些基础知识
24
同步阻塞与异步非阻塞适用场景
25
PHP7环境下出现zend_mm_heap corrupted
26
Swoole 项目起源和名字由来
27
’__builtin_saddl_overflow’ was not declared in this scope
28
生成可分发的二进制swoole版本
29
在phpinfo中有在php -m中没有
30
Connection refused是怎么回事
31
Resource temporarily unavailable [11]
32
Cannot assign requested address [99]
33
swoole与node.js相比有哪些优势
34
swoole与golang相比有哪些优势
35
pcre.h: No such file or directory
36
编译安装
37
编译参数
38
常见错误
39
Cygwin
40
快速起步
41
创建TCP服务器
42
使用异步客户端
43
多进程共享数据
44
使用协程客户端
45
协程:并发 shell_exec
46
协程:Go + Chan + Defer
47
协程:实现 Go 语言风格的 defer
48
协程:实现 sync.WaitGroup 功能
49
创建UDP服务器
50
创建Web服务器
51
创建WebSocket服务器
52
设置定时器
53
执行异步任务
54
创建同步TCP客户端
55
创建异步TCP客户端
56
网络通信协议设计
57
编程须知
58
sleep/usleep的影响
59
exit/die函数的影响
60
while循环的影响
61
stat缓存清理
62
mt_rand随机数
63
进程隔离
64
版本更新记录
65
4.3.0 [大版本]
66
4.1.0
67
4.0.1
68
4.0.0
69
4.2.12
70
4.2.11
71
4.2.10
72
4.2.9
73
4.2.8
74
4.2.7
75
4.2.0
76
向下不兼容改动
77
新特性使用
78
4.3.0 在 Process 中使用协程
79
1.7.5 在Server中使用swoole_table
80
1.7.5 swoole_client支持sendfile接口
81
1.7.4 SSL隧道加密TCP-Server
82
1.7.4 task进程中使用毫秒定时器
83
1.7.3 固定包头+包体协议自动分包
84
1.7.3 onTask直接return取代finish函数
85
1.7.2 swoole_process多进程模块的使用
86
1.7.2 task进程使用消息队列
87
4.3.0 延时事件机制改进
88
2.1.2 进程池模块的使用
89
1.9.24 调度支持 Stream 模式
90
1.9.24 异步客户端自动解析域名
91
1.9.17 支持异步安全重启特性
92
1.9.14 使用异步客户端超时机制
93
1.8.0 使用内置Http异步客户端
94
1.7.16 使用迭代器遍历Server所有连接
95
项目路线图
96
php.ini选项
97
Process
98
Process::__construct
99
Process->statQueue
100
Process->freeQueue
101
Process->push
102
Process->pop
103
Process->close
104
Process->exit
105
Process::kill
106
Process::wait
107
Process::daemon
108
Process::signal
109
Process->start
110
Process::alarm
111
Process::setAffinity
112
Process::exportSocket
113
Process->name
114
Process->exec
115
Process->write
116
Process->read
117
Process->setTimeout
118
Process->setBlocking
119
Process->useQueue
120
Process\Pool
121
Process\Pool::__construct
122
Process\Pool->on
123
Process\Pool->listen
124
Process\Pool->write
125
Process\Pool->start
126
Process\Pool->getProcess
127
Client
128
方法列表
129
swoole_client::__construct
130
swoole_client->send
131
swoole_client->sendto
132
swoole_client->sendfile
133
swoole_client->recv
134
swoole_client->close
135
swoole_client->sleep
136
swoole_client->wakeup
137
swoole_client->enableSSL
138
swoole_client->set
139
swoole_client->on
140
swoole_client->connect
141
swoole_client->isConnected
142
swoole_client->getSocket
143
swoole_client->getSockName
144
swoole_client->getPeerName
145
swoole_client->getPeerCert
146
回调函数
147
onConnect
148
onError
149
onReceive
150
onClose
151
onBufferFull
152
onBufferEmpty
153
属性列表
154
swoole_client->errCode
155
swoole_client->sock
156
swoole_client->reuse
157
并行
158
swoole_client_select
159
TCP客户端异步连接
160
SWOOLE_KEEP建立TCP长连接
161
常量
162
配置选项
163
ssl_verify_peer
164
ssl_host_name
165
ssl_cafile
166
ssl_capath
167
package_length_func
168
http_proxy_host
169
常见问题
170
Event
171
swoole_event_add
172
swoole_event_dispatch
173
常见问题
174
epoll_wait 偶尔会用很长时间
175
swoole_event_set
176
swoole_event_isset
177
swoole_event_write
178
swoole_event_del
179
swoole_event_exit
180
swoole_event_defer
181
swoole_event_cycle
182
swoole_event_wait
183
高级
184
Swoole的实现
185
swoole服务器如何做到无人值守100%可用
186
MySQL的连接池、异步、断线重连
187
PHP中哪些函数是同步阻塞的
188
守护进程程序常用数据结构
189
队列(Queue)
190
堆(Heap)
191
定长数组(SplFixedArray)
192
使用jemalloc优化swoole内存分配性能
193
C开发者如何使用Swoole
194
C++开发者如何使用Swoole
195
使用systemd管理swoole服务
196
网卡中断设置
197
将Swoole静态编译内嵌到PHP
198
Reactor线程
199
异步回调程序内存管理
200
日志等级控制
201
使用 asan 内存检测
202
Windows编译
203
Swoole协程之旅-前篇
204
Swoole协程之旅-中篇
205
Swoole协程之旅-后篇
206
协程CPU密集场景调度实现
207
Manager进程
208
Worker进程
209
Reactor、Worker、TaskWorker的关系
210
Task/Finish特性的用途
211
在php-fpm或apache中使用swoole
212
Swoole异步与同步的选择
213
TCP/UDP压测工具
214
其他
215
函数列表
216
swoole_set_process_name
217
swoole_version
218
swoole_strerror
219
swoole_errno
220
swoole_get_local_ip
221
swoole_clear_dns_cache
222
swoole_get_local_mac
223
swoole_cpu_num
224
swoole_last_error
225
附录:Linux错误码(errno)列表
226
附录:Swoole错误码列表
227
附录:TCP连接的状态
228
附录:tcpdump抓包工具的使用
229
附录:strace工具的使用
230
附录:gdb工具的使用
231
附录:lsof工具的使用
232
附录:perf工具的使用
233
附录:编译PHP扩展的相关工具
234
备用:已移除的历史特性
235
swoole_server->handler
236
onMasterConnect
237
onMasterClose
238
Nginx/Golang/Swoole/Node.js的性能对比
239
Coroutine::call_user_func
240
Coroutine::call_user_func_array
241
Coroutine\Channel::select
242
task_async
243
task_worker_max
244
swoole_server->addtimer
245
swoole_server->deltimer
246
onTimer
247
swoole_timer_add
248
swoole_timer_del
249
swoole_get_mysqli_sock
250
swoole_mysql_query
251
历史:版本更新记录(1.x)
252
1.10.3
253
1.9.16
254
1.9.15
255
1.9.14
256
1.9.12
257
1.9.11
258
1.9.9
259
1.9.7
260
1.9.6
261
1.9.5
262
1.9.4
263
1.10.2
264
1.9.3
265
1.9.2
266
1.9.1
267
1.9.0
268
1.8.13
269
1.8.12
270
1.8.11
271
1.8.10
272
1.8.9
273
1.8.8
274
1.10.1
275
1.8.7
276
1.8.6
277
1.8.5
278
1.8.4
279
1.8.3
280
1.8.2
281
1.8.1
282
1.8.0
283
1.7.22
284
1.7.21
285
1.10.0
286
1.7.20
287
1.7.19
288
1.7.18
289
1.7.17
290
1.7.16
291
1.7.15
292
1.7.14
293
1.7.13
294
1.7.12
295
1.7.11
296
1.9.23
297
1.7.10
298
1.7.9
299
1.7.8
300
1.7.7
301
1.7.6
302
1.7.5
303
v1.5
304
v1.6
305
v1.7
306
1.9.22
307
1.9.19
308
1.9.18
309
1.9.17
310
历史:版本更新记录(2.x)
311
2.0.1-Alpha
312
2.1.2
313
2.2.0
314
3.0.0
315
2.0.5
316
2.0.9
317
1.9.21
318
2.0.10
319
2.0.11
320
2.0.12
321
2.0.13
322
2.1.1
323
历史:版本更新记录(4.x)
324
4.0.3
325
4.2.5
326
4.2.6
327
4.2.7
328
4.2.9
329
4.2.8
330
4.0.2
331
4.0.4
332
4.1.1
333
4.1.2
334
4.2.1
335
4.2.2
336
4.2.3
337
4.2.4
338
Swoole技术会议
339
工作组(Working Groups)
340
参与开源项目指引
341
捐赠Swoole项目
342
加入Swoole开发组
343
非协程特性独立扩展 (swoole_async)
344
附录:Linux信号列表
345
Server
346
函数列表
347
Server::__construct
348
Server->shutdown
349
Server->tick
350
Server->after
351
Server->defer
352
Server->clearTimer
353
Server->close
354
Server->send
355
Server->sendfile
356
Server->sendto
357
Server->sendwait
358
Server->set
359
Server->sendMessage
360
Server->exist
361
Server->pause
362
Server->resume
363
Server->getClientInfo
364
Server->getClientList
365
Server->bind
366
Server->stats
367
Server->task
368
Server->taskwait
369
Server->on
370
Server->taskWaitMulti
371
Server->taskCo
372
Server->finish
373
Server->heartbeat
374
Server->getLastError
375
Server->getSocket
376
Server->protect
377
Server->confirm
378
Server->addListener
379
Server->addProcess
380
Server->listen
381
Server->start
382
Server->reload
383
Server->stop
384
属性列表
385
Server::$setting
386
Server::$master_pid
387
Server::$manager_pid
388
Server::$worker_id
389
Server::$worker_pid
390
Server::$taskworker
391
Server::$connections
392
Server::$ports
393
配置选项
394
reactor_num
395
dispatch_func
396
message_queue_key
397
daemonize
398
backlog
399
log_file
400
log_level
401
heartbeat_check_interval
402
heartbeat_idle_time
403
open_eof_check
404
open_eof_split
405
worker_num
406
package_eof
407
open_length_check
408
package_length_type
409
package_length_func
410
package_max_length
411
open_cpu_affinity
412
cpu_affinity_ignore
413
open_tcp_nodelay
414
tcp_defer_accept
415
ssl_cert_file
416
max_request
417
ssl_method
418
ssl_ciphers
419
user
420
group
421
chroot
422
pid_file
423
pipe_buffer_size
424
buffer_output_size
425
socket_buffer_size
426
enable_unsafe_event
427
max_conn (max_connection)
428
discard_timeout_request
429
enable_reuse_port
430
enable_delay_receive
431
open_http_protocol
432
open_http2_protocol
433
open_websocket_protocol
434
open_mqtt_protocol
435
open_websocket_close_frame
436
reload_async
437
tcp_fastopen
438
task_worker_num
439
request_slowlog_file
440
enable_coroutine
441
max_coroutine
442
task_enable_coroutine
443
task_ipc_mode
444
task_max_request
445
task_tmpdir
446
dispatch_mode
447
监听端口
448
可选参数
449
可选回调
450
连接迭代器
451
预定义常量
452
事件回调函数
453
onStart
454
onBufferFull
455
onBufferEmpty
456
onTask
457
onFinish
458
onPipeMessage
459
onWorkerError
460
onManagerStart
461
onManagerStop
462
onShutdown
463
onWorkerStart
464
onWorkerStop
465
onWorkerExit
466
onConnect
467
onReceive
468
onPacket
469
onClose
470
高级特性
471
改变Worker进程的用户/组
472
Server的两种运行模式介绍
473
Server中对象的4层生命周期
474
在worker进程内监听一个Server端口
475
在php-fpm/apache中使用task功能
476
回调函数中的 reactor_id 和 fd
477
Length_Check 和 EOF_Check 的使用
478
Worker与Reactor通信模式
479
TCP-Keepalive死连接检测
480
TCP服务器心跳维持方案
481
多端口监听的使用
482
捕获Server运行期致命错误
483
Server内存管理机制
484
常见问题
485
为什么不要send完后立即close
486
如何在回调函数中访问外部的变量
487
是否可以共用1个redis或mysql连接
488
关于onConnect/onReceive/onClose顺序
489
4种PHP回调函数风格
490
不同的Server程序实例间如何通信
491
错误信息:ERROR (9006)
492
eventLoop has already been created. unable to create swoole_server
493
压力测试
494
并发10万TCP连接的测试
495
PHP7+Swoole/Nginx/Golang性能对比
496
全球Web框架权威性能测试 Techempower Web Framework Benchmarks
497
Coroutine
498
Coroutine
499
Coroutine::getCid
500
Coroutine::gethostbyname
501
Coroutine::getaddrinfo
502
Coroutine::exec
503
Coroutine::readFile
504
Coroutine::writeFile
505
Coroutine::stats
506
Coroutine::statvfs
507
Coroutine::getBackTrace
508
Coroutine::listCoroutines
509
Coroutine::set
510
Coroutine::create
511
Coroutine::yield
512
Coroutine::resume
513
Coroutine::defer
514
Coroutine::fread
515
Coroutine::fgets
516
Coroutine::fwrite
517
Coroutine::sleep
518
Server
519
并发调用
520
setDefer 机制
521
子协程+通道
522
实现原理
523
协程与线程
524
发送数据协程调度
525
协程内存开销
526
4.0 协程实现原理
527
协程客户端超时规则
528
协程执行流程
529
常见问题
530
运行中出现 Fatal error: Maximum function nesting level of ‘1000’ reached, aborting!
531
为什么只能在回调函数中使用协程客户端
532
支持协程的回调方法列表
533
错误信息: XXXX client has already been bound to another coroutine
534
Swoole4 协程与 PHP 的 Yield/Generator 协程有什么区别
535
Swoole4 协程与 Go 协程有哪些区别
536
编程须知
537
在多个协程间共用同一个协程客户端
538
禁止使用协程 API 的场景(2.x 版本)
539
使用类静态变量/全局变量保存上下文
540
退出协程
541
异常处理
542
扩展组件
543
MongoDB
544
编程调试
545
Coroutine\Channel
546
Coroutine\Channel->__construct
547
Coroutine\Channel->$errCode
548
Coroutine\Channel->push
549
Coroutine\Channel->pop
550
Coroutine\Channel->stats
551
Coroutine\Channel->close
552
Coroutine\Channel->length
553
Coroutine\Channel->isEmpty
554
Coroutine\Channel->isFull
555
Coroutine\Channel->$capacity
556
Coroutine\Client
557
Coroutine\Client->connect
558
Coroutine\Client->send
559
Coroutine\Client->recv
560
Coroutine\Client->close
561
Coroutine\Client->peek
562
Coroutine\Http\Client
563
属性列表
564
Coroutine\Http\Client->get
565
Coroutine\Http\Client->post
566
Coroutine\Http\Client->upgrade
567
Coroutine\Http\Client->push
568
Coroutine\Http\Client->recv
569
Coroutine\Http\Client->addFile
570
Coroutine\Http\Client->addData
571
Coroutine\Http\Client->download
572
Coroutine\Http2\Client
573
Coroutine\Http2\Client->__construct
574
Coroutine\Http2\Client->set
575
Coroutine\Http2\Client->connect
576
Coroutine\Http2\Client->send
577
Coroutine\Http2\Client->write
578
Coroutine\Http2\Client->recv
579
Coroutine\Http2\Client->close
580
Coroutine\Redis
581
Coroutine\Redis::__construct
582
Coroutine\Redis::setOptions
583
属性列表
584
事务模式
585
订阅模式
586
Coroutine\Socket
587
Coroutine\Socket::__construct
588
Coroutine\Socket->getsockname
589
Coroutine\Socket->getpeername
590
Coroutine\Socket->close
591
Coroutine\Socket->bind
592
Coroutine\Socket->listen
593
Coroutine\Socket->accept
594
Coroutine\Socket->connect
595
Coroutine\Socket->send
596
Coroutine\Socket->recv
597
Coroutine\Socket->sendto
598
Coroutine\Socket->recvfrom
599
Coroutine\MySQL
600
属性列表
601
Coroutine\MySQL->connect
602
Coroutine\MySQL->query
603
Coroutine\MySQL->prepare
604
Coroutine\MySQL->escape
605
Coroutine\MySQL\Statement->execute
606
Coroutine\MySQL\Statement->fetch
607
Coroutine\MySQL\Statement->fetchAll
608
Coroutine\MySQL\Statement->nextResult
609
Coroutine\PostgreSQL
610
Coroutine\PostgreSQL->connect
611
Coroutine\PostgreSQL->metaData
612
Coroutine\PostgreSQL->query
613
Coroutine\PostgreSQL->fetchAll
614
Coroutine\PostgreSQL->affectedRows
615
Coroutine\PostgreSQL->numRows
616
Coroutine\PostgreSQL->fetchObject
617
Coroutine\PostgreSQL->fetchAssoc
618
Coroutine\PostgreSQL->fetchArray
619
Coroutine\PostgreSQL->fetchRow
620
Runtime
621
文件操作
622
睡眠函数
623
开关选项
624
严格模式
625
Timer
626
swoole_timer_tick
627
swoole_timer_after
628
swoole_timer_clear
629
Memory
630
Lock
631
swoole_lock->__construct
632
swoole_lock->lock
633
swoole_lock->trylock
634
swoole_lock->unlock
635
swoole_lock->lock_read
636
swoole_lock->trylock_read
637
swoole_lock->lockwait
638
Buffer
639
swoole_buffer->__construct
640
swoole_buffer->append
641
swoole_buffer->substr
642
swoole_buffer->clear
643
swoole_buffer->expand
644
swoole_buffer->write
645
swoole_buffer->read
646
swoole_buffer->recycle
647
Table
648
Table->__construct
649
Table->del
650
Table->column
651
Table->create
652
Table->set
653
Table->incr
654
Table->decr
655
Table->get
656
Table->exist
657
Table->count
658
Atomic
659
swoole_atomic->__construct
660
swoole_atomic->add
661
swoole_atomic->sub
662
swoole_atomic->get
663
swoole_atomic->set
664
swoole_atomic->cmpset
665
swoole_atomic->wait
666
swoole_atomic->wakeup
667
mmap
668
swoole_mmap::open
669
Channel
670
Channel->__construct
671
Channel->push
672
Channel->pop
673
Channel->stats
674
Serialize
675
swoole_serialize::pack
676
swoole_serialize::unpack
677
Http\Server
678
Http\Server
679
Http\Server->on
680
Http\Server->start
681
Http\Request
682
Http\Request->$header
683
Http\Request->$server
684
Http\Request->$get
685
Http\Request->$post
686
Http\Request->$cookie
687
Http\Request->$files
688
Http\Request->rawContent
689
Http\Request->getData
690
Http\Response
691
Http\Response->header
692
Http\Response::create
693
Http\Response->cookie
694
Http\Response->status
695
Http\Response->gzip
696
Http\Response->redirect
697
Http\Response->write
698
Http\Response->sendfile
699
Http\Response->end
700
Http\Response->detach
701
配置选项
702
upload_tmp_dir
703
http_parse_post
704
document_root
705
http_compression
706
常见问题
707
CURL发送POST请求服务器端超时
708
使用Chrome访问服务器会产生2次请求
709
GET/POST请求的最大尺寸
710
WebSocket\Server
711
回调函数
712
onHandShake
713
onOpen
714
onMessage
715
函数列表
716
WebSocket\Server->push
717
WebSocket\Server->exist
718
WebSocket\Server::pack
719
WebSocket\Server::unpack
720
WebSocket\Server->disconnect
721
WebSocket\Server->isEstablished
722
预定义常量
723
常见问题
724
配置选项
725
WebSocket\Frame
726
Redis\Server
727
方法
728
Redis\Server->setHandler
729
Redis\Server::format
730
常量
开始记录
善良比聪明更重要(评论内容审核后才会显示)
全部评论
RELATED · 延伸阅读
相关书籍
Hyperf 项目实战开发教程
swoole 文档及入门教程
easyswoole 文档 - 帮助手册 - 教程
Hyperf 学习记录
Swoole Hyperf 学习笔记
swoole 入门到精通教程
杂谈
分享,让知识传承更久远
×
文档下载
×
请下载您需要的格式的文档,随时随地,享受汲取知识的乐趣!
PDF
文档
EPUB
文档
MOBI
文档