预定义常量
最后更新于:2022-04-02 06:23:46
# 预定义常量
[TOC]
* **SWOOLE\_VERSION**当前Swoole的版本号,字符串类型,如1.6.0
## swoole\_server构造函数参数
* **SWOOLE\_BASE**使用Base模式,业务代码在Reactor进程中直接执行
* **SWOOLE\_PROCESS**使用进程模式,业务代码在Worker进程中执行
## swoole\_client构造函数参数
* **SWOOLE\_SOCK\_TCP**创建tcp socket
* **SWOOLE\_SOCK\_TCP6**创建tcp ipv6 socket
* **SWOOLE\_SOCK\_UDP**创建udp socket
* **SWOOLE\_SOCK\_UDP6**创建udp ipv6 socket
* **SWOOLE\_SOCK\_UNIX\_DGRAM**创建unix dgram socket
* **SWOOLE\_SOCK\_UNIX\_STREAM**创建unix stream socket
* **SWOOLE\_SOCK\_SYNC**同步客户端
* **SWOOLE\_SOCK\_ASYNC**异步客户端
## swoole\_lock构造函数参数
* **SWOOLE\_FILELOCK**创建文件锁
* **SWOOLE\_MUTEX**创建互斥锁
* **SWOOLE\_RWLOCK**创建读写锁
* **SWOOLE\_SPINLOCK**创建自旋锁
* **SWOOLE\_SEM**创建信号量
## SSL加密方法
* SWOOLE\_SSLv3\_METHOD
* SWOOLE\_SSLv3\_SERVER\_METHOD
* SWOOLE\_SSLv3\_CLIENT\_METHOD
* SWOOLE\_SSLv23\_METHOD(默认加密方法)
* SWOOLE\_SSLv23\_SERVER\_METHOD
* SWOOLE\_SSLv23\_CLIENT\_METHOD
* SWOOLE\_TLSv1\_METHOD
* SWOOLE\_TLSv1\_SERVER\_METHOD
* SWOOLE\_TLSv1\_CLIENT\_METHOD
* SWOOLE\_TLSv1\_1\_METHOD
* SWOOLE\_TLSv1\_1\_SERVER\_METHOD
* SWOOLE\_TLSv1\_1\_CLIENT\_METHOD
* SWOOLE\_TLSv1\_2\_METHOD
* SWOOLE\_TLSv1\_2\_SERVER\_METHOD
* SWOOLE\_TLSv1\_2\_CLIENT\_METHOD
* SWOOLE\_DTLSv1\_METHOD
* SWOOLE\_DTLSv1\_SERVER\_METHOD
* SWOOLE\_DTLSv1\_CLIENT\_METHOD
';