文字

The EventHttp class

(PECL event >= 1.4.0-beta)

简介

Represents HTTP server.

类摘要

final EventHttp {
public bool accept ( mixed $socket )
public bool addServerAlias ( string $alias )
public void bind ( string $address , int $port )
public __construct ( EventBase $base [, EventSslContext $ctx = NULL ] )
public bool removeServerAlias ( string $alias )
public void setAllowedMethods ( int $methods )
public void setCallback ( string $path , string $cb [, string $arg ] )
public void setDefaultCallback ( string $cb [, string $arg ] )
public void setMaxBodySize ( int $value )
public void setMaxHeadersSize ( int $value )
public void setTimeout ( int $value )
}

Table of Contents

  • EventHttp::accept — Makes an HTTP server accept connections on the specified socket stream or resource
  • EventHttp::addServerAlias — Adds a server alias to the HTTP server object
  • EventHttp::bind — Binds an HTTP server on the specified address and port
  • EventHttp::__construct — Constructs EventHttp object(the HTTP server)
  • EventHttp::removeServerAlias — Removes server alias
  • EventHttp::setAllowedMethods — Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks
  • EventHttp::setCallback — Sets a callback for specified URI
  • EventHttp::setDefaultCallback — Sets default callback to handle requests that are not caught by specific callbacks
  • EventHttp::setMaxBodySize — Sets maximum request body size
  • EventHttp::setMaxHeadersSize — Sets maximum HTTP header size
  • EventHttp::setTimeout — Sets the timeout for an HTTP request
上一篇: 下一篇: