| 182 | |
| 183 | |
| 184 | void handle(Exception& ex) { |
| 185 | OutType* pOut(NULL); |
| 186 | SocketAddress address; |
| 187 | |
| 188 | while (true) { |
| 189 | { |
| 190 | std::lock_guard<std::mutex> lock(_outMutex); |
| 191 | if (_output.empty()) |
| 192 | break; |
| 193 | pOut = _output.front(); |
| 194 | _output.pop_front(); |
| 195 | address = _outAddresses.front(); |
| 196 | _outAddresses.pop_front(); |
| 197 | } |
| 198 | Events::OnDecoded<DecodedType>::raise(pOut->decoded,address); |
| 199 | delete pOut; |
| 200 | } |
| 201 | if (pOut) // at less one has been done |
| 202 | Events::OnDecodedEnd::raise(); |
| 203 | } |
| 204 | |
| 205 | bool _new; |
| 206 | OutType* _pLastOut; |