socket_create_listen
socket_create_listen
Opens a socket on port to accept connections
**socket_create_listen** int $port int $backlog
creates a new instance of
type listening on
local interfaces on the given port waiting for new connections.
socket_create_listen``Socket``AF_INETall
This function is meant to ease the task of creating a new socket which only listens to accept new connections.
portThe port on which to listen on all interfaces.
backlog
The parameter defines the maximum length
the queue of pending connections may grow to.
may be passed as
parameter, see
for more information.
backlog``SOMAXCONN``backlog``socket_listen
returns a new instance
on success or false on error. The error code can be retrieved with
. This code may be passed to
to get a textual explanation of the
error.
socket_create_listen``Socket``socket_last_error``socket_strerror
Opmerking: > If you want to create a socket which only listens on a certain interface you need to use , and .
socket_create``socket_bind``socket_listen
socket_create``socket_create_pair``socket_bind``socket_listen``socket_last_error``socket_strerror