This function waits for a socket connection.

Syntax

int SyncAcceptSc(
  SOCKET *sock, 
  struct sockaddr_in *pstrAcceptAddr 
);

Parameters

sock
[out]Returns the socket descriptor generated by ACCEPT.
pstrAcceptAddr
[in]A pointer to the sockaddr_in structure.

Return value

The following values will be returned.
ValueDescription
SOCK_ERR_NO_ERROR Succeeded
SOCK_ERROR Sock error(Please recreate the socket.)
Other than the above Failed

Remarks

Wait for a socket connection.

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Last updated: 2020/10/14