本文整理汇总了C++中Endpoint::Address方法的典型用法代码示例。如果您正苦于以下问题:C++ Endpoint::Address方法的具体用法?C++ Endpoint::Address怎么用?C++ Endpoint::Address使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Endpoint
的用法示例。
在下文中一共展示了Endpoint::Address方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsLocationReachable
TBool DviProtocolUpnpAdapterSpecificData::IsLocationReachable(const Endpoint& aEndpoint)
{
/* This method has the same purpose as CpiDeviceListUpnp::IsLocationReachable.
The reachability check is needed to ensure that all M-SEARCH responses contain
a location Uri that can be accessed by the M-SEARCH sender. */
return (aEndpoint.Address() & iMask) == (iSubnet & iMask);
}
示例2: OsNetworkConnect
void OpenHome::Os::NetworkConnect(THandle aHandle, const Endpoint& aEndpoint, TUint aTimeoutMs)
{
int32_t err = OsNetworkConnect(aHandle, aEndpoint.Address(), aEndpoint.Port(), aTimeoutMs);
if (err != 0) {
LOG2F(kNetwork, kError, "Os::NetworkConnect H = %d, RETURN VALUE = %d\n", aHandle, err);
THROW(NetworkError);
}
}
示例3: OsNetworkConnect
void OpenHome::Os::NetworkConnect(THandle aHandle, const Endpoint& aEndpoint, TUint aTimeoutMs)
{
int32_t err = OsNetworkConnect(aHandle, aEndpoint.Address(), aEndpoint.Port(), aTimeoutMs);
if (err != 0) {
LOG2F(kNetwork, kError, "Os::NetworkConnect H = %d, RETURN VALUE = %d\n", aHandle, err);
if (err == -1) // Timeout
THROW(NetworkTimeout);
if (err == -2) // Connection refused
THROW(NetworkError);
ASSERTS(); // invalid error
}
}
示例4: Listen
void MdnsPlatform::Listen()
{
LOG(kBonjour, "Bonjour Listen\n");
mDNSAddr dst;
mDNSIPPort dstport;
SetAddress(dst, iMulticast);
SetPort(dstport, iMulticast);
mDNSAddr src;
mDNSIPPort srcport;
while (!iStop) {
try {
LOG(kBonjour, "Bonjour Listen - Wait For Message\n");
iReaderController.Read(iMessage);
LOG(kBonjour, "Bonjour Listen - Message Received\n");
TByte* ptr = (TByte*)iMessage.Ptr();
TUint bytes = iMessage.Bytes();
Endpoint sender = iReaderController.Sender();
SetAddress(src, sender);
SetPort(srcport, sender);
iInterfacesLock.Wait();
TIpAddress senderAddr = sender.Address();
mDNSInterfaceID interfaceId = (mDNSInterfaceID)0;
for (TUint i=0; i<(TUint)iInterfaces.size(); i++) {
if (iInterfaces[i]->ContainsAddress(senderAddr)) {
#ifndef DEFINE_WINDOWS_UNIVERSAL
interfaceId = (mDNSInterfaceID)iInterfaces[i]->Address();
#endif // DEFINE_WINDOWS_UNIVERSAL
break;
}
}
iInterfacesLock.Signal();
if (interfaceId != (mDNSInterfaceID)0) {
mDNSCoreReceive(iMdns, ptr, ptr + bytes, &src, srcport, &dst, dstport, interfaceId);
}
iReaderController.ReadFlush();
}
catch (ReaderError) {
if (!iStop) {
LOG(kBonjour, "Bonjour Listen - Reader Error\n");
}
}
}
}
示例5: SetEndpoint
void OhmSenderDriverWindows::SetEndpoint(const Endpoint& aEndpoint)
{
KSPROPERTY prop;
prop.Set = SNEAKY_GUID;
prop.Id = KSPROPERTY_SNEAKY_ENDPOINT;
prop.Flags = KSPROPERTY_TYPE_SET;
TByte buffer[8];
ULONG* ptr = (ULONG*)buffer;
*ptr++ = Arch::BigEndian4(aEndpoint.Address());
*ptr++ = aEndpoint.Port();
DWORD bytes;
DeviceIoControl(iHandle, IOCTL_KS_PROPERTY, &prop, sizeof(KSPROPERTY), &buffer, sizeof(buffer), &bytes, 0);
}
示例6: NetworkBind
TInt Os::NetworkBind(THandle aHandle, const Endpoint& aEndpoint)
{
TInt ret = OsNetworkBind(aHandle, aEndpoint.Address(), aEndpoint.Port());
return ret;
}
示例7: NetworkBindMulticast
TInt Os::NetworkBindMulticast(THandle aHandle, TIpAddress aAdapter, const Endpoint& aMulticast)
{
TInt ret = OsNetworkBindMulticast(aHandle, aAdapter, aMulticast.Address(), aMulticast.Port());
return ret;
}
示例8: GetClientEndpoint
void DvInvocationStd::GetClientEndpoint(TIpAddress& aClientAddress, uint32_t& aClientPort) const
{
Endpoint ep = iInvocation.ClientEndpoint();
aClientAddress = ep.Address();
aClientPort = ep.Port();
}