OCaml non-blocking client socket
问题 Is there a way to use a client socket in a non blocking way. For example, if I create a socket for a client to connect on a server and that I do recursive recv on that socket, the last call of Unix.recv will block when no data is send and if the connection is not closed by the server. In C, you can specify flags for both : socket() and use the SOCK_NONBLOCK flag ORed with the socket type or receiv() with the MSG_DONTWAIT flags. I have looked here : http://caml.inria.fr/pub/docs/manual-ocaml