Unix and Linux Discussions Tagged with socket |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
9,087 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
3,121 |
Shell Programming and Scripting |
|
|
|
2 |
3,259 |
AIX |
|
|
|
4 |
3,524 |
Shell Programming and Scripting |
|
|
|
1 |
35,436 |
Shell Programming and Scripting |
|
|
|
0 |
7,890 |
IP Networking |
|
|
|
1 |
2,629 |
Solaris |
|
|
|
4 |
2,437 |
Shell Programming and Scripting |
|
|
|
3 |
7,951 |
IP Networking |
|
|
|
2 |
12,843 |
Shell Programming and Scripting |
|
|
|
2 |
4,003 |
Programming |
|
|
|
2 |
4,064 |
Programming |
|
|
|
1 |
4,416 |
Programming |
|
|
|
0 |
5,843 |
Solaris |
|
|
|
0 |
5,268 |
Programming |
|
|
|
4 |
11,293 |
Shell Programming and Scripting |
|
|
|
0 |
3,923 |
Shell Programming and Scripting |
|
|
|
2 |
3,569 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
10,154 |
Shell Programming and Scripting |
|
|
|
5 |
9,093 |
Programming |
|
|
|
5 |
15,579 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
19,631 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,710 |
Programming |
|
|
|
3 |
13,489 |
Programming |
|
|
|
3 |
3,270 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
6,988 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
15,445 |
Programming |
|
|
|
3 |
10,997 |
Programming |
|
|
|
1 |
4,008 |
Programming |
|
|
|
3 |
15,789 |
Programming |
|
|
|
1 |
2,183 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
3,736 |
Programming |
|
|
|
1 |
13,672 |
Programming |
|
|
|
2 |
7,487 |
Shell Programming and Scripting |
|
|
|
1 |
5,380 |
IP Networking |
|
|
|
1 |
2,720 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
3,918 |
Linux |
|
|
|
0 |
4,567 |
Linux |
|
|
|
0 |
2,805 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,980 |
Programming |
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)