------------------------------------------------------------------------------------------------------------------------------------
| 47 | |
| 48 | //------------------------------------------------------------------------------------------------------------------------------------ |
| 49 | void LocalPC::processIncomingPackets() |
| 50 | { |
| 51 | INTERLOCKED; |
| 52 | try |
| 53 | { |
| 54 | // mark our slot |
| 55 | shd->peer[self].lastOccupied = GetTickCount(); |
| 56 | |
| 57 | // pass all packets to storm |
| 58 | /*int incomingCount = shd->peer[self].incomingCount; |
| 59 | if(incomingCount > 16) |
| 60 | incomingCount = 16;*/ |
| 61 | for(int i = 0; i < shd->peer[self].incomingCount; i++) |
| 62 | { |
| 63 | Packet &packet = shd->peer[self].incoming[i]; |
| 64 | passPacket(packet.sender, Util::MemoryFrame(packet.data, packet.length)); |
| 65 | } |
| 66 | |
| 67 | // clear incoming queue |
| 68 | shd->peer[self].incomingCount = 0; |
| 69 | } |
| 70 | catch(GeneralException &e) |
| 71 | { |
| 72 | DropLastError("processIncomingPackets failed: %s", e.getMessage()); |
| 73 | } |
| 74 | } |
| 75 | //------------------------------------------------------------------------------------------------------------------------------------ |
| 76 | //------------------------------------------------------------------------------------------------------------------------------------ |
| 77 | void LocalPC::initialize() |
nothing calls this directly
no test coverage detected