php man page for socket_accept

Query: socket_accept

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SOCKET_ACCEPT(3)							 1							  SOCKET_ACCEPT(3)

socket_accept - Accepts a connection on a socket

SYNOPSIS
resource socket_accept (resource $socket)
DESCRIPTION
After the socket $socket has been created using socket_create(3), bound to a name with socket_bind(3), and told to listen for connections with socket_listen(3), this function will accept incoming connections on that socket. Once a successful connection is made, a new socket resource is returned, which may be used for communication. If there are multiple connections queued on the socket, the first will be used. If there are no pending connections, socket_accept(3) will block until a connection becomes present. If $socket has been made non-blocking using socket_set_blocking(3) or socket_set_nonblock(3), FALSE will be returned. The socket resource returned by socket_accept(3) may not be used to accept new connections. The original listening socket $socket, how- ever, remains open and may be reused.
PARAMETERS
o $socket - A valid socket resource created with socket_create(3).
RETURN VALUES
Returns a new socket resource on success, or FALSE on error. The actual error code can be retrieved by calling socket_last_error(3). This error code may be passed to socket_strerror(3) to get a textual explanation of the error.
SEE ALSO
socket_connect(3), socket_listen(3), socket_create(3), socket_bind(3), socket_strerror(3). PHP Documentation Group SOCKET_ACCEPT(3)
Related Man Pages
accept(2) - mojave
accept(2) - bsd
listen(3xnet) - opensolaris
listen(3xnet) - sunos
socket_bind(3) - php
Similar Topics in the Unix Linux Community
socket programming
Getting PID of Open Connectivity
basic socket programming
Perl and Sockets - Error handling
help with socket programming in c