Returns EventHttpConnection object

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.

參見

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *