| 134 | mask.on(port); |
| 135 | } |
| 136 | else |
| 137 | { |
| 138 | for (i = 0; i++ < NUM_PORTS_TO_TRY; port += PORT_INTERVAL) |
| 139 | { |
| 140 | mask.on(port); |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | static NetPeer* getClientPeer() |
| 146 | // should be called inside of poolLock.enter() |
| 147 | { |
| 148 | if (!clientPeer) |
| 149 | { |
| 150 | BitMask portMask; |
| 151 | setupPortBitMask(portMask, false); |
| 152 | clientPeer = getPool()->createPeer(&portMask); |
| 153 | if (clientPeer) |
| 154 | { |
| 155 | NetChannel* ctrl = clientPeer->getBroadcastChannel(); |
| 156 | if (ctrl) |
| 157 | { |
no test coverage detected