当前位置: 首页>>代码示例>>C++>>正文


C++ CHeaderData::getYourPort方法代码示例

本文整理汇总了C++中CHeaderData::getYourPort方法的典型用法代码示例。如果您正苦于以下问题:C++ CHeaderData::getYourPort方法的具体用法?C++ CHeaderData::getYourPort怎么用?C++ CHeaderData::getYourPort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CHeaderData的用法示例。


在下文中一共展示了CHeaderData::getYourPort方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: writeHeader

bool CHBRepeaterProtocolHandler::writeHeader(CHeaderData& header)
{
	unsigned char buffer[50U];
	unsigned int length = header.getHBRepeaterData(buffer, 50U, true);

#if defined(DUMP_TX)
	CUtils::dump(wxT("Sending Header"), buffer, length);
	return true;
#else
	return m_socket.write(buffer, length, header.getYourAddress(), header.getYourPort());
#endif
}
开发者ID:KH6VM,项目名称:OpenSystemFusion,代码行数:12,代码来源:HBRepeaterProtocolHandler.cpp

示例2: sendHeader

bool CAPRSTransmit::sendHeader(const CHeaderData& header)
{
	unsigned char buffer[60U];
	unsigned int length = header.getG2Data(buffer, 60U, true);

	for (unsigned int i = 0U; i < 2U; i++) {
		bool res = m_socket.write(buffer, length, header.getYourAddress(), header.getYourPort());
		if (!res)
			return false;
	}

	return true;
}
开发者ID:dl5di,项目名称:OpenDV,代码行数:13,代码来源:APRSTransmit.cpp

示例3: writeHeader

bool CDPlusProtocolHandler::writeHeader(const CHeaderData& header)
{
	unsigned char buffer[60U];
	unsigned int length = header.getDPlusData(buffer, 60U, true);

#if defined(DUMP_TX)
	CUtils::dump(wxT("Sending Header"), buffer, length);
#endif

	for (unsigned int i = 0U; i < 5U; i++) {
		bool res = m_socket.write(buffer, length, header.getYourAddress(), header.getYourPort());
		if (!res)
			return false;
	}

	return true;
}
开发者ID:OZ1BV,项目名称:DMRRepeater,代码行数:17,代码来源:DPlusProtocolHandler.cpp

示例4: process

void CDPlusHandler::process(CHeaderData& header)
{
	in_addr   yourAddress = header.getYourAddress();
	unsigned int yourPort = header.getYourPort();
	unsigned int   myPort = header.getMyPort();

	for (unsigned int i = 0U; i < m_maxReflectors; i++) {
		CDPlusHandler* reflector = m_reflectors[i];

		if (reflector != NULL) {
			if (reflector->m_yourAddress.s_addr == yourAddress.s_addr &&
				reflector->m_yourPort           == yourPort &&
				reflector->m_myPort             == myPort) {
				reflector->processInt(header);
				return;
			}
		}
	}	
}
开发者ID:BackupTheBerlios,项目名称:opendv-svn,代码行数:19,代码来源:DPlusHandler.cpp

示例5: write

void CHeaderLogger::write(const wxChar* type, const CHeaderData& header)
{
	wxASSERT(type != NULL);

	time_t timeNow = ::time(NULL);
	struct tm* tm = ::gmtime(&timeNow);

	char* t = ::inet_ntoa(header.getYourAddress());
	wxString address(t, wxConvLocal);

	wxString text;
	text.Printf(wxT("%04d-%02d-%02d %02d:%02d:%02d: %s header - My: %s/%s  Your: %s  Rpt1: %s  Rpt2: %s  Flags: %02X %02X %02X (%s:%u)\n"),
		tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, type,
		header.getMyCall1().c_str(), header.getMyCall2().c_str(), header.getYourCall().c_str(),
		header.getRptCall1().c_str(), header.getRptCall2().c_str(), header.getFlag1(), header.getFlag2(),
		header.getFlag3(), address.c_str(), header.getYourPort());

	m_file.Write(text);
	m_file.Flush();
}
开发者ID:NJ08512,项目名称:OpenDV,代码行数:20,代码来源:HeaderLogger.cpp


注:本文中的CHeaderData::getYourPort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。