if fragment.fragments_remaining == 0 {
host_notify_message(host, peer, command.channel, fragment.data);
- for iter.as_iterator(^channel.pending_fragments, by_pointer=true) {
+ for iter.as_iter(^channel.pending_fragments, by_pointer=true) {
if it.fragment_id == fragment_id {
#remove;
break;
}
peer_check_outgoing_commands :: (peer: ^Peer) {
- for iter.as_iterator(^peer.sent_reliable_commands) {
+ for iter.as_iter(^peer.sent_reliable_commands) {
time_diff := math.abs(cast(i64) it.sent_time - cast(i64) peer.host.current_time);
if time_diff >= ~~ peer.no_ack_resend_timeout {
peer.outgoing_commands << it;
peer_remove_sent_reliable_command :: (peer: ^Peer, seq_num: u16, channel: Channel_ID) -> Command {
command: ^Outgoing_Command;
- for iter.as_iterator(^peer.sent_reliable_commands) {
+ for iter.as_iter(^peer.sent_reliable_commands) {
if it.reliable_seq_number == seq_num && it.command.channel == channel {
command = it;
#remove;