本文整理汇总了C++中Endpoint::Port方法的典型用法代码示例。如果您正苦于以下问题:C++ Endpoint::Port方法的具体用法?C++ Endpoint::Port怎么用?C++ Endpoint::Port使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Endpoint
的用法示例。
在下文中一共展示了Endpoint::Port方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
}
示例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);
if (err == -1) // Timeout
THROW(NetworkTimeout);
if (err == -2) // Connection refused
THROW(NetworkError);
ASSERTS(); // invalid error
}
}
示例3: 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);
}
示例4: SetPort
void MdnsPlatform::SetPort(mDNSIPPort& aPort, const Endpoint& aEndpoint)
{
LOG(kBonjour, "Bonjour SetPort From Endpoint\n");
SetPort(aPort, aEndpoint.Port());
}
示例5: NetworkBind
TInt Os::NetworkBind(THandle aHandle, const Endpoint& aEndpoint)
{
TInt ret = OsNetworkBind(aHandle, aEndpoint.Address(), aEndpoint.Port());
return ret;
}
示例6: NetworkBindMulticast
TInt Os::NetworkBindMulticast(THandle aHandle, TIpAddress aAdapter, const Endpoint& aMulticast)
{
TInt ret = OsNetworkBindMulticast(aHandle, aAdapter, aMulticast.Address(), aMulticast.Port());
return ret;
}
示例7: GetClientEndpoint
void DvInvocationStd::GetClientEndpoint(TIpAddress& aClientAddress, uint32_t& aClientPort) const
{
Endpoint ep = iInvocation.ClientEndpoint();
aClientAddress = ep.Address();
aClientPort = ep.Port();
}