Please avoid using recv, use get_once instead, which is non_blocking and still allows you to powerful control through timeouts.