Group: Windows Sockets 2 (Winsock) - Library: ws2_32
How to build UDP responder
How to create non-blocking Winsock server
int bind(
SOCKET s,
const struct sockaddr* name,
int namelen
);
DECLARE INTEGER bind IN ws2_32 As ws_bind;
INTEGER s,;
STRING @ sockaddr,;
INTEGER namelen
s [in] Descriptor identifying an unbound socket.
name [in] Address to assign to the socket from the sockaddr structure.
namelen [in] Length of the value in the name parameter, in bytes.
If no error occurs, bind returns zero. Otherwise, it returns SOCKET_ERROR, and a specific error code can be retrieved by calling WSAGetLastError.
In Visual FoxPro 8 declare bind function with an alias, because it may mix with BINDEVENT.