本文整理汇总了C++中Groupsock::port方法的典型用法代码示例。如果您正苦于以下问题:C++ Groupsock::port方法的具体用法?C++ Groupsock::port怎么用?C++ Groupsock::port使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Groupsock
的用法示例。
在下文中一共展示了Groupsock::port方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void PassiveServerMediaSubsession
::getStreamParameters(unsigned /*clientSessionId*/,
netAddressBits /*clientAddress*/,
Port const& /*clientRTPPort*/,
Port const& /*clientRTCPPort*/,
int /*tcpSocketNum*/,
unsigned char /*rtpChannelId*/,
unsigned char /*rtcpChannelId*/,
netAddressBits& destinationAddress,
u_int8_t& destinationTTL,
Boolean& isMulticast,
Port& serverRTPPort,
Port& serverRTCPPort,
void*& streamToken) {
isMulticast = True;
Groupsock& gs = fRTPSink.groupsockBeingUsed();
if (destinationTTL == 255) destinationTTL = gs.ttl();
if (destinationAddress == 0) { // normal case
destinationAddress = gs.groupAddress().s_addr;
} else { // use the client-specified destination address instead:
struct in_addr destinationAddr; destinationAddr.s_addr = destinationAddress;
gs.changeDestinationParameters(destinationAddr, 0, destinationTTL);
if (fRTCPInstance != NULL) {
Groupsock* rtcpGS = fRTCPInstance->RTCPgs();
rtcpGS->changeDestinationParameters(destinationAddr, 0, destinationTTL);
}
}
serverRTPPort = gs.port();
if (fRTCPInstance != NULL) {
Groupsock* rtcpGS = fRTCPInstance->RTCPgs();
serverRTCPPort = rtcpGS->port();
}
streamToken = NULL; // not used
}