Group: Windows Sockets 2 (Winsock) - Library: ws2_32
Winsock: retrieving Web pages using sockets (HTTP, port 80)
Winsock: sending email messages (SMTP, port 25)
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Winsock: reading email messages (POP3, port 110)
Winsock: connecting to a news server (NNTP, port 119)
How to create non-blocking Winsock server
int recv(
SOCKET s,
char* buf,
int len,
int flags
);
DECLARE INTEGER recv IN ws2_32;
INTEGER s,;
STRING @ buf,;
INTEGER buflen,;
INTEGER flags
s [in] Descriptor identifying a connected socket.
buf [out] Buffer for the incoming data.
len [in] Length of buf, in bytes
flags [in] Flag specifying the way in which the call is made.
If no error occurs, recv returns the number of bytes received. If the connection has been gracefully closed, the return value is zero.