在线文档教程
PHP
事件 | Event

EventHttpConnection (class)

The EventHttpConnection class

介绍

(PECL event >= 1.4.0-beta)

代表一个HTTP连接。

类简介

EventHttpConnection {

/* Methods */

public __construct ( EventBase $base , EventDnsBase $dns_base , string $address , int $port [, EventSslContext $ctx = NULL ] )

public EventBase getBase ( void )

public void getPeer ( string &$address , int &$port )

public bool makeRequest ( EventHttpRequest $req , int $type , string $uri )

public void setCloseCallback ( callable $callback [, mixed $data ] )

public void setLocalAddress ( string $address )

public void setLocalPort ( int $port )

public void setMaxBodySize ( string $max_size )

public void setMaxHeadersSize ( string $max_size )

public void setRetries ( int $retries )

public void setTimeout ( int $timeout )

}

目录

  • EventHttpConnection :: __construct - 构造EventHttpConnection对象

  • EventHttpConnection :: getBase - 返回与连接关联的事件库

  • EventHttpConnection :: getPeer - 获取与连接关联的远程地址和端口

  • EventHttpConnection :: makeRequest - 通过指定的连接发出HTTP请求

  • EventHttpConnection :: setCloseCallback - 为连接关闭设置回调

  • EventHttpConnection :: setLocalAddress - 设置从中进行HTTP连接的IP地址

  • EventHttpConnection :: setLocalPort - 设置进行连接的本地端口

  • EventHttpConnection :: setMaxBodySize - 设置连接的最大主体大小

  • EventHttpConnection :: setMaxHeadersSize - 设置最大标题大小

  • EventHttpConnection :: setRetries - 设置连接的重试限制

  • EventHttpConnection :: setTimeout - 设置连接的超时时间

← EventHttp::setTimeout

EventHttpConnection::__construct →