Never mind, I found the mistake I was making. I thought I had to use the flags of the msg struct to set nonblocking mode, like in sock_sendmsg. Instead it expects flags as the fourth parameter in sock_recvmsg. It seems to work now...
_________________________
Frank van Gestel