| 134 | } |
| 135 | |
| 136 | void NetConnection::eventPacketReceived(PacketNotify *notify) |
| 137 | { |
| 138 | NetEventNote *walk = notify->eventList; |
| 139 | NetEventNote **noteList = &mNotifyEventList; |
| 140 | |
| 141 | while(walk) |
| 142 | { |
| 143 | NetEventNote *next = walk->mNextEvent; |
| 144 | if(walk->mEvent->mGuaranteeType != NetEvent::GuaranteedOrdered) |
| 145 | { |
| 146 | walk->mEvent->notifyDelivered(this, true); |
| 147 | walk->mEvent->decRef(); |
| 148 | mEventNoteChunker.free(walk); |
| 149 | walk = next; |
| 150 | } |
| 151 | else |
| 152 | { |
| 153 | while(*noteList && (*noteList)->mSeqCount < walk->mSeqCount) |
| 154 | noteList = &((*noteList)->mNextEvent); |
| 155 | |
| 156 | walk->mNextEvent = *noteList; |
| 157 | *noteList = walk; |
| 158 | noteList = &walk->mNextEvent; |
| 159 | walk = next; |
| 160 | } |
| 161 | } |
| 162 | while(mNotifyEventList && mNotifyEventList->mSeqCount == mLastAckedEventSeq + 1) |
| 163 | { |
| 164 | mLastAckedEventSeq++; |
| 165 | NetEventNote *next = mNotifyEventList->mNextEvent; |
| 166 | //Con::printf("EVT %d: ACK - %d", getId(), mNotifyEventList->mSeqCount); |
| 167 | mNotifyEventList->mEvent->notifyDelivered(this, true); |
| 168 | mNotifyEventList->mEvent->decRef(); |
| 169 | mEventNoteChunker.free(mNotifyEventList); |
| 170 | mNotifyEventList = next; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | void NetConnection::eventWritePacket(BitStream *bstream, PacketNotify *notify) |
| 175 | { |
nothing calls this directly
no test coverage detected