AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database

Socket_Accept - accept()

In:     R0 = Socket descriptor of listening socket
     R1 = Pointer to address to be filled in
     R2 = Pointer to word giving the size of the address block

Out:     R0 = Socket descriptor for new connection

This call is used to accept connections from server sockets that have been told to listen for new connections. A new socket will be created for each incoming connection, and this call in then used to obtain the descriptor for the next pending connection.

The address of the host which initiated the returned connection will also be returned, in the supplied address block. This block is in the same format as that given to Socket_Bind.

If there are no connections waiting to be accepted, this call will block until a connection is available to be returned, unless the socket has been marked as non-blocking using Socket_Ioctl, in which case the error EWOULDBLOCK will be returned.


[sh-index] Back to list of manuals