略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: EventHttpRequest::getConnection

2025-02-27

EventHttpRequest::getConnection

(PECL event >= 1.8.0)

EventHttpRequest::getConnectionReturns EventHttpConnection object

说明

Returns EventHttpConnection object which represents HTTP connection associated with the request.

警告

Libevent API allows HTTP request objects to be not bound to any HTTP connection. Therefore we can't unambiguously associate EventHttpRequest with EventHttpConnection . Thus, we construct EventHttpConnection object on-the-fly. Having no information about the event base, DNS base and connection-close callback, we just leave these fields unset.

EventHttpRequest::getConnection() method is usually useful when we need to set up a callback on connection close. See EventHttpConnection::setCloseCallback() .

参数

此函数没有参数。

返回值

Returns EventHttpConnection object.

参见

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/eventhttprequest.getconnection.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3