read

(4.0.2 - 4.0.6 only)

read -- Liest vom Socket

Beschreibung

int read (int socket_des, string &buffer, int length)

Warnung

This function is EXPERIMENTAL. That means, that the behaviour of this function, this function name, in concreto ANYTHING documented here can change in a future release of PHP WITHOUT NOTICE. Be warned, and use this function at your own risk.

Die Funktion read() liest vom Socket socket_des, der von der Funktion accept_connect() erzeugt wurde die Anzahl Bytes, die in dem Parameter length übergeben wurde in den Puffer &buffer. Um das Lesen zu Beenden, kann man \n, \t oder \0 benutzen. Gibt die Anzahl der gelesenen Bytes zurück.

Der optionale type ist eine benannte Konstante:

Siehe auch: accept_connect(), bind(), connect(), listen(), strerror(), socket_get_status() und write().