socket_select(PHP 4 >= 4.0.7, PHP 5) socket_select — Runs the select() system call on the given arrays of sockets with a specified timeout Описание
int socket_select
( array &$read
, array &$write
, array &$except
, int $tv_sec
[, int $tv_usec
] )
socket_select() accepts arrays of sockets and waits for them to change status. Those coming with BSD sockets background will recognize that those socket resource arrays are in fact the so-called file descriptor sets. Three independent arrays of socket resources are watched. Список параметров
Внимание
On exit, the arrays are modified to indicate which socket resource actually changed status. You do not need to pass every array to socket_select(). You can leave it out and use an empty array or NULL instead. Also do not forget that those arrays are passed by reference and will be modified after socket_select() returns.
Возвращаемые значенияOn success socket_select() returns the number of socket resources contained in the modified arrays, which may be zero if the timeout expires before anything interesting happens. On error FALSE is returned. The error code can be retrieved with socket_last_error().
Примеры
Пример #3 socket_select() example
<?phpПримечания
|
|
|
| © 2009 Тест скорости интернета | Boont.Ru |