//------------------------------------------------------------------------------------- Reason NetworkInterface::send(Bundle & bundle, Channel * pChannel) { Reason reason = REASON_SUCCESS; const Bundle::Packets& pakcets = bundle.packets(); Bundle::Packets::const_iterator iter = pakcets.begin(); for (; iter != pakcets.end(); iter++) { reason = this->sendPacket((*iter), pChannel); if(reason != REASON_SUCCESS) break; } bundle.onSendComplete(); return reason; }