while ( $sel->can_read( $args{mx} ) ) { recv ($sock, $ssdp_res_msg, 4096, 0); print "$ssdp_res_msg"; ... }