IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-10
accept
accept
The accept function checks for connections on an existing waited socket. When a
connection request arrives, accept creates a new socket to use for data transfer and
accepts the connection on the new socket.
new_socket
is the socket number for the new, connected socket that is created for data
transfer. This is the return value.
If the call is not successful, -1 is returned and the external variable errno
is set as indicated below in “Errors.”
socket
specifies the socket number, created by a previous socket call, to be used to
check for connections.
from_ptr
points, on return, to the IPX address data structure for the new connection.
from_len_ptr
points, initially, to a value indicating the size in bytes of the structure pointed to by
from_ptr. On return, it points to the actual length in bytes of the remote
sockaddr_nv data structure, pointed to by from_ptr.
C Synopsis
#include <socket.h>
#include <nv.h>
#include <netdb.h>
new_socket = accept (socket, from_ptr, from_len_ptr);
int new_socket, socket, *from_len_ptr;
struct sockaddr *from_ptr;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
new_socket := accept (socket, from_ptr, from_len_ptr);
INT socket,
.EXT from_len_ptr;
INT .EXT from_ptr (sockaddr);