ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
事件驱动,非阻塞式 I/O,其他的 ev/uv/eio 之类的想了解也可以看看 这是使用特定平台可用的最佳I / O通知机制有效地调度基于I / O,时间和信号的事件的扩展。这是libevent与PHP基础结构的移植。 请注意,*event-1.0.0*及更高版本与以前的版本不兼容 [https://pecl.php.net/package/event](https://pecl.php.net/package/event). * [例子](https://www.php.net/manual/en/event.examples.php) * [事件标志](https://www.php.net/manual/en/event.flags.php) * [关于事件持久性](https://www.php.net/manual/en/event.persistence.php) * [事件回调](https://www.php.net/manual/en/event.callbacks.php) * [构造信号事件](https://www.php.net/manual/en/event.constructing.signal.events.php) * [事件](https://www.php.net/manual/en/class.event.php)—事件类 * [Event ::](https://www.php.net/manual/en/event.add.php)add-使事件挂起 * [Event :: addSignal](https://www.php.net/manual/en/event.addsignal.php)—使信号事件挂起 * [Event :: addTimer](https://www.php.net/manual/en/event.addtimer.php)—使计时器事件挂起 * [Event :: \_\_ construct](https://www.php.net/manual/en/event.construct.php)—构造事件对象 * [Event :: del](https://www.php.net/manual/en/event.del.php)—使事件处于未决状态 * [Event :: delSignal](https://www.php.net/manual/en/event.delsignal.php)—使信号事件处于未决状态 * [Event :: delTimer](https://www.php.net/manual/en/event.deltimer.php)—使计时器事件处于未挂起状态 * [Event :: free](https://www.php.net/manual/en/event.free.php)—使事件成为非挂起事件,并为此事件分配空闲资源 * [Event :: getSupportedMethods](https://www.php.net/manual/en/event.getsupportedmethods.php)—返回具有此版本Libevent支持的方法名称的数组 * [Event :: pending](https://www.php.net/manual/en/event.pending.php)—检测事件是挂起还是已调度 * [Event :: set](https://www.php.net/manual/en/event.set.php)—重新配置事件 * [Event :: setPriority](https://www.php.net/manual/en/event.setpriority.php)—设置事件优先级 * [Event :: setTimer](https://www.php.net/manual/en/event.settimer.php)—重新配置计时器事件 * [Event :: signal](https://www.php.net/manual/en/event.signal.php)—构造信号事件对象 * [Event :: timer](https://www.php.net/manual/en/event.timer.php)—构造计时器事件对象 * [EventBase](https://www.php.net/manual/en/class.eventbase.php)— EventBase类 * [EventBase :: \_\_ construct](https://www.php.net/manual/en/eventbase.construct.php)—构造EventBase对象 * [EventBase :: dispatch](https://www.php.net/manual/en/eventbase.dispatch.php)—调度未决事件 * [EventBase :: exit](https://www.php.net/manual/en/eventbase.exit.php)—停止调度事件 * [EventBase :: free](https://www.php.net/manual/en/eventbase.free.php)—为此事件库分配的免费资源 * [EventBase :: getFeatures](https://www.php.net/manual/en/eventbase.getfeatures.php)—返回支持的功能的位掩码 * [EventBase :: getMethod](https://www.php.net/manual/en/eventbase.getmethod.php)—返回正在使用的事件方法 * [EventBase :: getTimeOfDayCached](https://www.php.net/manual/en/eventbase.gettimeofdaycached.php)—返回当前事件的基准时间 * [EventBase :: gotExit](https://www.php.net/manual/en/eventbase.gotexit.php)—检查是否告知事件循环退出 * [EventBase :: gotStop](https://www.php.net/manual/en/eventbase.gotstop.php)—检查是否告知事件循环退出 * [EventBase :: loop](https://www.php.net/manual/en/eventbase.loop.php)—调度未决事件 * [EventBase :: priorityInit](https://www.php.net/manual/en/eventbase.priorityinit.php)—设置每个事件库的优先级数量 * [EventBase :: reInit](https://www.php.net/manual/en/eventbase.reinit.php)—重新初始化事件库(在派生之后) * [EventBase :: stop](https://www.php.net/manual/en/eventbase.stop.php)—告诉event\_base停止调度事件 * [EventBuffer](https://www.php.net/manual/en/class.eventbuffer.php)— EventBuffer类 * [EventBuffer :: add](https://www.php.net/manual/en/eventbuffer.add.php)—将数据追加到事件缓冲区的末尾 * [EventBuffer :: addBuffer](https://www.php.net/manual/en/eventbuffer.addbuffer.php)—将所有数据从提供的缓冲区移到EventBuffer的当前实例 * [EventBuffer :: appendFrom](https://www.php.net/manual/en/eventbuffer.appendfrom.php)—将指定数量的字节从源缓冲区移动到当前缓冲区的末尾 * [EventBuffer ::](https://www.php.net/manual/en/eventbuffer.construct.php)\_\_construct —构造EventBuffer对象 * [EventBuffer :: copyout](https://www.php.net/manual/en/eventbuffer.copyout.php)—从缓冲区的前面复制指定数量的字节 * [EventBuffer :: drain](https://www.php.net/manual/en/eventbuffer.drain.php)—从缓冲区的[开头](https://www.php.net/manual/en/eventbuffer.drain.php)删除指定数量的字节,而不将其复制到任何地方 * [EventBuffer :: enableLocking](https://www.php.net/manual/en/eventbuffer.enablelocking.php)—说明 * [EventBuffer :: expand](https://www.php.net/manual/en/eventbuffer.expand.php)—在缓冲区中保留空间 * [EventBuffer :: freeze](https://www.php.net/manual/en/eventbuffer.freeze.php)—阻止成功修改事件缓冲区的调用 * [EventBuffer :: lock](https://www.php.net/manual/en/eventbuffer.lock.php)—获取缓冲区锁定 * [EventBuffer :: prepend](https://www.php.net/manual/en/eventbuffer.prepend.php)—在缓冲区的前面添加数据 * [EventBuffer :: prependBuffer](https://www.php.net/manual/en/eventbuffer.prependbuffer.php)—将所有数据从源缓冲区移到当前缓冲区的前面 * [EventBuffer :: pullup](https://www.php.net/manual/en/eventbuffer.pullup.php)—线性化缓冲区中的数据并以字符串形式返回其内容 * [EventBuffer :: read](https://www.php.net/manual/en/eventbuffer.read.php)—从evbuffer读取数据并耗尽读取的字节 * [EventBuffer :: readFrom](https://www.php.net/manual/en/eventbuffer.readfrom.php)—从文件读取数据到缓冲区的末尾 * [EventBuffer :: readLine](https://www.php.net/manual/en/eventbuffer.readline.php)—从缓冲区的前面提取一行 * [EventBuffer :: search](https://www.php.net/manual/en/eventbuffer.search.php)—扫描缓冲区是否出现字符串 * [EventBuffer :: searchEol](https://www.php.net/manual/en/eventbuffer.searcheol.php)—扫描缓冲区是否出现行尾 * [EventBuffer :: substr](https://www.php.net/manual/en/eventbuffer.substr.php)—[减去](https://www.php.net/manual/en/eventbuffer.substr.php)缓冲区数据的一部分 * [EventBuffer :: unfreeze](https://www.php.net/manual/en/eventbuffer.unfreeze.php)—重新启用修改事件缓冲区的调用 * [EventBuffer :: unlock](https://www.php.net/manual/en/eventbuffer.unlock.php)—释放由EventBuffer :: lock获取的锁 * [EventBuffer :: write](https://www.php.net/manual/en/eventbuffer.write.php)—将缓冲区的内容[写入](https://www.php.net/manual/en/eventbuffer.write.php)文件或套接字 * [EventBufferEvent](https://www.php.net/manual/en/class.eventbufferevent.php)— EventBufferEvent类 * [EventBufferEvent :: close](https://www.php.net/manual/en/eventbufferevent.close.php)—关闭与当前缓冲区事件关联的文件描述符 * [EventBufferEvent :: connect](https://www.php.net/manual/en/eventbufferevent.connect.php)—将缓冲区事件的文件描述符连接到给定地址或UNIX套接字 * [EventBufferEvent :: connectHost](https://www.php.net/manual/en/eventbufferevent.connecthost.php)—使用可选的异步DNS解析连接到主机名 * [EventBufferEvent ::](https://www.php.net/manual/en/eventbufferevent.construct.php)\_\_construct —构造EventBufferEvent对象 * [EventBufferEvent :: createPair](https://www.php.net/manual/en/eventbufferevent.createpair.php)—创建两个相互连接的缓冲区事件 * [EventBufferEvent :: disable](https://www.php.net/manual/en/eventbufferevent.disable.php)—禁用对缓冲区事件的读取,写入或同时禁用事件 * [EventBufferEvent :: enable](https://www.php.net/manual/en/eventbufferevent.enable.php)—启用对缓冲区事件的读取,写入或两者兼有的事件 * [EventBufferEvent :: free](https://www.php.net/manual/en/eventbufferevent.free.php)—释放缓冲区事件 * [EventBufferEvent :: getDnsErrorString](https://www.php.net/manual/en/eventbufferevent.getdnserrorstring.php)—返回描述上一次失败的DNS查找尝试的字符串 * [EventBufferEvent :: getEnabled](https://www.php.net/manual/en/eventbufferevent.getenabled.php)—返回当前在缓冲区事件上启用的事件的位掩码 * [EventBufferEvent :: getInput](https://www.php.net/manual/en/eventbufferevent.getinput.php)—返回与当前缓冲区事件关联的基础输入缓冲区 * [EventBufferEvent :: getOutput](https://www.php.net/manual/en/eventbufferevent.getoutput.php)—返回与当前缓冲区事件关联的基础输出缓冲区 * [EventBufferEvent :: read](https://www.php.net/manual/en/eventbufferevent.read.php)—读取缓冲区的数据 * [EventBufferEvent :: readBuffer](https://www.php.net/manual/en/eventbufferevent.readbuffer.php)—[清空](https://www.php.net/manual/en/eventbufferevent.readbuffer.php)输入缓冲区的全部内容并将其放入buf * [EventBufferEvent :: setCallbacks](https://www.php.net/manual/en/eventbufferevent.setcallbacks.php)—分配读,写和事件(状态)回调 * [EventBufferEvent :: setPriority](https://www.php.net/manual/en/eventbufferevent.setpriority.php)—为[缓冲区](https://www.php.net/manual/en/eventbufferevent.setpriority.php)事件分配优先级 * [EventBufferEvent :: setTimeouts](https://www.php.net/manual/en/eventbufferevent.settimeouts.php)—设置缓冲区事件的读写超时 * [EventBufferEvent :: setWatermark](https://www.php.net/manual/en/eventbufferevent.setwatermark.php)—调整读取和/或写入水印 * [EventBufferEvent :: sslError](https://www.php.net/manual/en/eventbufferevent.sslerror.php)—返回有关缓冲区事件报告的最新OpenSSL错误 * [EventBufferEvent :: sslFilter](https://www.php.net/manual/en/eventbufferevent.sslfilter.php)—创建一个新的SSL缓冲区事件以通过另一个缓冲区事件发送其数据 * [EventBufferEvent :: sslGetCipherInfo](https://www.php.net/manual/en/eventbufferevent.sslgetcipherinfo.php)—返回密码的文本描述 * [EventBufferEvent :: sslGetCipherName](https://www.php.net/manual/en/eventbufferevent.sslgetciphername.php)—返回SSL连接的当前密码名称 * [EventBufferEvent :: sslGetCipherVersion](https://www.php.net/manual/en/eventbufferevent.sslgetcipherversion.php)—返回当前SSL连接使用的密码版本 * [EventBufferEvent :: sslGetProtocol](https://www.php.net/manual/en/eventbufferevent.sslgetprotocol.php)—返回用于当前SSL连接的协议的名称 * [EventBufferEvent :: sslRenegotiate](https://www.php.net/manual/en/eventbufferevent.sslrenegotiate.php)—告诉bufferevent开始SSL重新协商 * [EventBufferEvent :: sslSocket](https://www.php.net/manual/en/eventbufferevent.sslsocket.php)—创建一个新的SSL缓冲区事件以通过套接字上的SSL发送其数据 * [EventBufferEvent :: write](https://www.php.net/manual/en/eventbufferevent.write.php)—将数据添加到缓冲区事件的输出缓冲区 * [EventBufferEvent :: writeBuffer](https://www.php.net/manual/en/eventbufferevent.writebuffer.php)—将整个缓冲区的内容添加到缓冲区事件的输出缓冲区 * [关于缓冲区事件回调](https://www.php.net/manual/en/eventbufferevent.about.callbacks.php) * [EventConfig](https://www.php.net/manual/en/class.eventconfig.php)— EventConfig类 * [EventConfig :: avoidMethod](https://www.php.net/manual/en/eventconfig.avoidmethod.php)—告诉libevent避免特定的事件方法 * [EventConfig :: \_\_ construct](https://www.php.net/manual/en/eventconfig.construct.php)—构造EventConfig对象 * [EventConfig :: requireFeatures](https://www.php.net/manual/en/eventconfig.requirefeatures.php)—输入应用程序所需的必需事件方法功能 * [EventConfig :: setMaxDispatchInterval](https://www.php.net/manual/en/eventconfig.setmaxdispatchinterval.php)—防止优先级倒置 * [EventDnsBase](https://www.php.net/manual/en/class.eventdnsbase.php)— EventDnsBase类 * [EventDnsBase :: addNameserverIp](https://www.php.net/manual/en/eventdnsbase.addnameserverip.php)—将名称服务器添加到DNS基础 * [EventDnsBase :: addSearch](https://www.php.net/manual/en/eventdnsbase.addsearch.php)—将域添加到搜索域列表中 * [EventDnsBase :: clearSearch](https://www.php.net/manual/en/eventdnsbase.clearsearch.php)—删除所有当前的搜索后缀 * [EventDnsBase :: \_\_ construct](https://www.php.net/manual/en/eventdnsbase.construct.php)—构造EventDnsBase对象 * [EventDnsBase :: countNameservers](https://www.php.net/manual/en/eventdnsbase.countnameservers.php)—获取已配置名称服务器的数量 * [EventDnsBase :: loadHosts](https://www.php.net/manual/en/eventdnsbase.loadhosts.php)—从主机文件加载主机文件(格式与/ etc / hosts相同) * [EventDnsBase :: parseResolvConf](https://www.php.net/manual/en/eventdnsbase.parseresolvconf.php)—扫描resolv.conf格式的文件 * [EventDnsBase :: setOption](https://www.php.net/manual/en/eventdnsbase.setoption.php)—设置配置选项的值 * [EventDnsBase :: setSearchNdots](https://www.php.net/manual/en/eventdnsbase.setsearchndots.php)—设置搜索的“ ndots”参数 * [EventHttp](https://www.php.net/manual/en/class.eventhttp.php)— EventHttp类 * [EventHttp :: accept](https://www.php.net/manual/en/eventhttp.accept.php)—使HTTP服务器接受指定套接字流或资源上的连接 * [EventHttp :: addServerAlias](https://www.php.net/manual/en/eventhttp.addserveralias.php)—将服务器别名添加到HTTP服务器对象 * [EventHttp :: bind](https://www.php.net/manual/en/eventhttp.bind.php)—在指定的地址和端口上绑定HTTP服务器 * [EventHttp :: \_\_ construct](https://www.php.net/manual/en/eventhttp.construct.php)—构造EventHttp对象(HTTP服务器) * [EventHttp :: removeServerAlias](https://www.php.net/manual/en/eventhttp.removeserveralias.php)—删除服务器别名 * [EventHttp :: setAllowedMethods](https://www.php.net/manual/en/eventhttp.setallowedmethods.php)—设置此服务器接受的请求中支持的HTTP方法,并传递给用户回调 * [EventHttp :: setCallback](https://www.php.net/manual/en/eventhttp.setcallback.php)—为指定的URI设置回调 * [EventHttp :: setDefaultCallback](https://www.php.net/manual/en/eventhttp.setdefaultcallback.php)—设置默认回调以处理未被特定回调捕获的请求 * [EventHttp :: setMaxBodySize](https://www.php.net/manual/en/eventhttp.setmaxbodysize.php)—设置最大请求正文大小 * [EventHttp :: setMaxHeadersSize-](https://www.php.net/manual/en/eventhttp.setmaxheaderssize.php)设置最大HTTP标头大小 * [EventHttp :: setTimeout](https://www.php.net/manual/en/eventhttp.settimeout.php)—设置HTTP请求的超时 * [EventHttpConnection](https://www.php.net/manual/en/class.eventhttpconnection.php)— EventHttpConnection类 * [EventHttpConnection :: \_\_ construct](https://www.php.net/manual/en/eventhttpconnection.construct.php)—构造EventHttpConnection对象 * [EventHttpConnection :: getBase](https://www.php.net/manual/en/eventhttpconnection.getbase.php)—返回与连接关联的事件库 * [EventHttpConnection :: getPeer](https://www.php.net/manual/en/eventhttpconnection.getpeer.php)—获取与连接关联的远程地址和端口 * [EventHttpConnection :: makeRequest](https://www.php.net/manual/en/eventhttpconnection.makerequest.php)—通过指定的连接发出HTTP请求 * [EventHttpConnection :: setCloseCallback](https://www.php.net/manual/en/eventhttpconnection.setclosecallback.php)—设置关闭连接的回调 * [EventHttpConnection :: setLocalAddress](https://www.php.net/manual/en/eventhttpconnection.setlocaladdress.php)—设置用于建立HTTP连接的IP地址 * [EventHttpConnection :: setLocalPort](https://www.php.net/manual/en/eventhttpconnection.setlocalport.php)—设置用于建立连接的本地端口 * [EventHttpConnection :: setMaxBodySize](https://www.php.net/manual/en/eventhttpconnection.setmaxbodysize.php)—设置连接的最大正文大小 * [EventHttpConnection :: setMaxHeadersSize-](https://www.php.net/manual/en/eventhttpconnection.setmaxheaderssize.php)设置最大标头大小 * [EventHttpConnection :: setRetries](https://www.php.net/manual/en/eventhttpconnection.setretries.php)—设置连接的重试限制 * [EventHttpConnection :: setTimeout](https://www.php.net/manual/en/eventhttpconnection.settimeout.php)—设置连接超时 * [EventHttpRequest](https://www.php.net/manual/en/class.eventhttprequest.php)— EventHttpRequest类 * [EventHttpRequest :: addHeader](https://www.php.net/manual/en/eventhttprequest.addheader.php)—将HTTP标头添加到请求的标头中 * [EventHttpRequest :: cancel](https://www.php.net/manual/en/eventhttprequest.cancel.php)—取消挂起的HTTP请求 * [EventHttpRequest :: clearHeaders](https://www.php.net/manual/en/eventhttprequest.clearheaders.php)—从请求的标头列表中删除所有输出标头 * [EventHttpRequest :: closeConnection](https://www.php.net/manual/en/eventhttprequest.closeconnection.php)—关闭关联的HTTP连接 * [EventHttpRequest :: \_\_ construct](https://www.php.net/manual/en/eventhttprequest.construct.php)—构造EventHttpRequest对象 * [EventHttpRequest :: findHeader](https://www.php.net/manual/en/eventhttprequest.findheader.php)—查找属于标头的值 * [EventHttpRequest :: free](https://www.php.net/manual/en/eventhttprequest.free.php)—释放对象并删除关联的事件 * [EventHttpRequest :: getBufferEvent](https://www.php.net/manual/en/eventhttprequest.getbufferevent.php)—返回EventBufferEvent对象 * [EventHttpRequest :: getCommand](https://www.php.net/manual/en/eventhttprequest.getcommand.php)—返回请求命令(方法) * [EventHttpRequest :: getConnection](https://www.php.net/manual/en/eventhttprequest.getconnection.php)—返回EventHttpConnection对象 * [EventHttpRequest :: getHost](https://www.php.net/manual/en/eventhttprequest.gethost.php)—返回请求主机 * [EventHttpRequest :: getInputBuffer](https://www.php.net/manual/en/eventhttprequest.getinputbuffer.php)—返回输入缓冲区 * [EventHttpRequest :: getInputHeaders](https://www.php.net/manual/en/eventhttprequest.getinputheaders.php)—返回输入标题的关联数组 * [EventHttpRequest :: getOutputBuffer](https://www.php.net/manual/en/eventhttprequest.getoutputbuffer.php)—返回请求的输出缓冲区 * [EventHttpRequest :: getOutputHeaders](https://www.php.net/manual/en/eventhttprequest.getoutputheaders.php)—返回输出标头的关联数组 * [EventHttpRequest :: getResponseCode](https://www.php.net/manual/en/eventhttprequest.getresponsecode.php)—返回响应代码 * [EventHttpRequest :: getUri](https://www.php.net/manual/en/eventhttprequest.geturi.php)—返回请求URI * [EventHttpRequest :: removeHeader](https://www.php.net/manual/en/eventhttprequest.removeheader.php)—从请求的标头中删除HTTP标头 * [EventHttpRequest :: sendError](https://www.php.net/manual/en/eventhttprequest.senderror.php)—将HTML错误消息发送到客户端 * [EventHttpRequest :: sendReply-](https://www.php.net/manual/en/eventhttprequest.sendreply.php)向客户端发送HTML回复 * [EventHttpRequest :: sendReplyChunk-](https://www.php.net/manual/en/eventhttprequest.sendreplychunk.php)发送另一个数据块作为正在进行的分块答复的一部分 * [EventHttpRequest :: sendReplyEnd](https://www.php.net/manual/en/eventhttprequest.sendreplyend.php)—完成分块答复,并根据需要释放请求 * [EventHttpRequest :: sendReplyStart](https://www.php.net/manual/en/eventhttprequest.sendreplystart.php)—启动分块答复 * [EventListener](https://www.php.net/manual/en/class.eventlistener.php)— EventListener类 * [EventListener :: \_\_ construct](https://www.php.net/manual/en/eventlistener.construct.php)—创建与事件库关联的新连接侦听器 * [EventListener :: disable](https://www.php.net/manual/en/eventlistener.disable.php)—禁用事件连接侦听器对象 * [EventListener :: enable](https://www.php.net/manual/en/eventlistener.enable.php)—启用事件连接侦听器对象 * [EventListener :: getBase](https://www.php.net/manual/en/eventlistener.getbase.php)—返回与事件侦听器关联的事件库 * [EventListener :: getSocketName](https://www.php.net/manual/en/eventlistener.getsocketname.php)—获取侦听器的套接字绑定到的当前地址 * [EventListener :: setCallback](https://www.php.net/manual/en/eventlistener.setcallback.php)— setCallback的用途 * [EventListener :: setErrorCallback](https://www.php.net/manual/en/eventlistener.seterrorcallback.php)—设置事件侦听器的错误回调 * [EventSslContext](https://www.php.net/manual/en/class.eventsslcontext.php)— EventSslContext类 * [EventSslContext :: \_\_ construct](https://www.php.net/manual/en/eventsslcontext.construct.php)—构造用于事件类的OpenSSL上下文 * [EventUtil](https://www.php.net/manual/en/class.eventutil.php)— EventUtil类 * [EventUtil :: \_\_construct](https://www.php.net/manual/en/eventutil.construct.php)—抽象构造函数 * [EventUtil :: getLastSocketErrno](https://www.php.net/manual/en/eventutil.getlastsocketerrno.php)—返回最新的套接字错误号 * [EventUtil :: getLastSocketError](https://www.php.net/manual/en/eventutil.getlastsocketerror.php)—返回最新的套接字错误 * [EventUtil :: getSocketFd](https://www.php.net/manual/en/eventutil.getsocketfd.php)—返回套接字或流的数字文件描述符 * [EventUtil :: getSocketName](https://www.php.net/manual/en/eventutil.getsocketname.php)—获取套接字绑定到的当前地址 * [EventUtil :: setSocketOption](https://www.php.net/manual/en/eventutil.setsocketoption.php)—设置套接字选项 * [EventUtil :: sslRandPoll](https://www.php.net/manual/en/eventutil.sslrandpoll.php)—通过OpenSSL的RAND\_poll()生成熵