Geen cache-versie.


Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Rechercher une fonction PHP

The EventBuffer class

(PECL event >= 1.5.0)

Introduction

EventBuffer represents Libevent's "evbuffer", an utility functionality for buffered I/O.

Event buffers are meant to be generally useful for doing the "buffer" part of buffered network I/O.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Class synopsis

EventBuffer {
/* Constants */
const integer EOL_ANY = 0 ;
const integer EOL_CRLF = 1 ;
const integer EOL_CRLF_STRICT = 2 ;
const integer EOL_LF = 3 ;
const integer PTR_SET = 0 ;
const integer PTR_ADD = 1 ;
/* Properties */
public readonly int $length ;
public readonly int $contiguous_space ;
/* Methods */
public add ( string $data ) : bool
public addBuffer ( EventBuffer $buf ) : bool
public appendFrom ( EventBuffer $buf , int $len ) : int
public __construct ( void )
public copyout ( string &$data , int $max_bytes ) : int
public drain ( int $len ) : bool
public enableLocking ( void ) : void
public expand ( int $len ) : bool
public freeze ( bool $at_front ) : bool
public lock ( void ) : void
public prepend ( string $data ) : bool
public prependBuffer ( EventBuffer $buf ) : bool
public pullup ( int $size ) : string
public read ( int $max_bytes ) : string
public read ( mixed $fd , int $howmuch ) : int
public readLine ( int $eol_style ) : string
public search ( string $what [, int $start = -1 [, int $end = -1 ]] ) : mixed
public searchEol ([ int $start = -1 [, int $eol_style = EventBuffer::EOL_ANY ]] ) : mixed
public substr ( int $start [, int $length ] ) : string
public unfreeze ( bool $at_front ) : bool
public unlock ( void ) : bool
public write ( mixed $fd [, int $howmuch ] ) : int
}

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Properties

length

The number of bytes stored in an event buffer.

contiguous_space

The number of bytes stored contiguously at the front of the buffer. The bytes in a buffer may be stored in multiple separate chunks of memory; the property returns the number of bytes currently stored in the first chunk.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Predefined Constants

EventBuffer::EOL_ANY

The end of line is any sequence of any number of carriage return and linefeed characters. This format is not very useful; it exists mainly for backward compatibility.

EventBuffer::EOL_CRLF

The end of the line is an optional carriage return, followed by a linefeed. (In other words, it is either a "\r\n" or a "\n" .) This format is useful in parsing text-based Internet protocols, since the standards generally prescribe a "\r\n" line-terminator, but nonconformant clients sometimes say just "\n" .

EventBuffer::EOL_CRLF_STRICT

The end of a line is a single carriage return, followed by a single linefeed. (This is also known as "\r\n" . The ASCII values are 0x0D 0x0A ).

EventBuffer::EOL_LF

The end of a line is a single linefeed character. (This is also known as "\n" . It is ASCII value is 0x0A .)

EventBuffer::PTR_SET

Flag used as argument of EventBuffer::setPosition() method. If this flag specified, the position pointer is moved to an absolute position within the buffer.

EventBuffer::PTR_ADD

The same as EventBuffer::PTR_SET , except this flag causes EventBuffer::setPosition() method to move position forward up to the specified number of bytes(instead of setting absolute position).

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Table of Contents

Zoek een PHP-functie

Vertaling niet beschikbaar

De PHP-handleiding is nog niet in het Nederlands vertaald, dus het scherm is in het Engels. Als u wilt, kunt u het ook in het Frans of in het Duits raadplegen.

Als je de moed voelt, kun je je vertaling aanbieden ;-)

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 30/01/2003 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/php-rf-class.eventbuffer.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : http://php.net

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut