The program will wait until a message on the socket is received; then the read operation will return (with the data in the newly received message)
fcntl(socket_variable, F_SETFL, fcntl(recvfd, F_GETFL)|O_NDELAY);