(BTW, non-blocking mode is a mode that you place a socket in by calling WSAASyncSelect() or ioctlsocket())
When recv() is called and there is no data, normally the call would block until data was received. In non-blocking mode, a call that normally would block returns a value of SOCKET_ERROR, and the specific error code "WSAEWOULDBLOCK" may be retrieved by calling WSAGetLastError(). recv() follows this rule. While it is not recommended, a crude polling technique could be implemented in this manner.
Brian Batchelder | Hewlett-Packard | email@example.com
Connectivity Standards Architect | 1115 SE 164th Ave. | Phone: (360) 212-4107
DeskJet Printers | Vancouver, WA 98684 | Fax: (360) 212-4227
IEEE 1212r Chair, IEEE 1284.4 Editor, 1394 Printer Working Group