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:
PHP_BINARY_READ - benutzt die Systemfunktion read() (Standard in PHP >= 4.0.7)
PHP_NORMAL_READ - Beendet das Lesen mit \n or \r. (Standard in PHP <= 4.0.6)
Siehe auch: accept_connect(), bind(), connect(), listen(), strerror(), socket_get_status() und write().