listen

(4.0.2 - 4.0.6 only)

listen -- Listens for a connection on a socket

Description

int listen (resource socket, int backlog)

Waarschuwing

Deze functie is EXPERIMENTEEL. Dat betekent, dat het gedrag van deze functie, deze functienaam, in concreto ALLES dat hier gedocumenteerd is in een toekomstige uitgave van PHP ZONDER WAARSCHUWING kan veranderen. Wees gewaarschuwd, en gebruik deze functie op eigen risico.

After the socket socket has been created using socket() and bound to a name with bind(), it may be told to listen for incoming connections on socket. A maximum of backlog incoming connections will be queued for processing.

listen() is applicable only to sockets with type SOCK_STREAM or SOCK_SEQPACKET.

Returns zero on success, or a negative error code on failure. This code may be passed to strerror() to get a textual explanation of the error.

See also accept_connect(), bind(), connect(), socket(), socket_get_status(), and strerror().