my $msg = pack('N/a', nfreeze($data)); while (length($msg)) { send_msg_block(substr($msg, 0, $max_msg_size, '')); }