void CDExtraHandler::process(CHeaderData& header) { for (unsigned int i = 0U; i < m_maxReflectors; i++) { CDExtraHandler* reflector = m_reflectors[i]; if (reflector != NULL) { if (reflector->m_address.s_addr == header.getAddress().s_addr && reflector->m_port == header.getPort()) reflector->processInt(header); } } }
bool CTimeServerThread::sendHeader(const CHeaderData &header) { unsigned char buffer[60U]; unsigned int length = header.getG2Data(buffer, 60U, true); #if defined(DUMP_TX) CUtils::dump(wxT("Sending Header"), buffer, length); return true; #else for (unsigned int i = 0U; i < 5U; i++) { bool res = m_socket.write(buffer, length, header.getAddress(), header.getPort()); if (!res) return false; } return true; #endif }