addressed Axel's suggestion regarding SocketAddress' GetPort() name.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20851 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos
2007-04-27 07:20:43 +00:00
parent 25a2744f9e
commit 5084c83901
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ public:
return fModule->equal_masked_addresses(fAddress, address, mask); return fModule->equal_masked_addresses(fAddress, address, mask);
} }
uint16 GetPort() const uint16 Port() const
{ {
return fModule->get_port(fAddress); return fModule->get_port(fAddress);
} }
@@ -161,7 +161,7 @@ public:
return fModule->equal_masked_addresses(fAddress, address, mask); return fModule->equal_masked_addresses(fAddress, address, mask);
} }
uint16 GetPort() const uint16 Port() const
{ {
return fModule->get_port(fAddress); return fModule->get_port(fAddress);
} }
@@ -73,14 +73,14 @@ EndpointHashDefinition::HashKey(uint16 port) const
size_t size_t
EndpointHashDefinition::Hash(TCPEndpoint *endpoint) const EndpointHashDefinition::Hash(TCPEndpoint *endpoint) const
{ {
return endpoint->LocalAddress().GetPort(); return endpoint->LocalAddress().Port();
} }
bool bool
EndpointHashDefinition::Compare(uint16 port, TCPEndpoint *endpoint) const EndpointHashDefinition::Compare(uint16 port, TCPEndpoint *endpoint) const
{ {
return endpoint->LocalAddress().GetPort() == port; return endpoint->LocalAddress().Port() == port;
} }
@@ -146,7 +146,7 @@ EndpointManager::SetConnection(TCPEndpoint *endpoint,
local.SetTo(_local); local.SetTo(_local);
if (local.IsEmpty(false)) { if (local.IsEmpty(false)) {
uint16 port = local.GetPort(); uint16 port = local.Port();
local.SetTo(interfaceLocal); local.SetTo(interfaceLocal);
local.SetPort(port); local.SetPort(port);
} }
@@ -372,7 +372,7 @@ EndpointManager::Unbind(TCPEndpoint *endpoint)
BenaphoreLocker _(fLock); BenaphoreLocker _(fLock);
TCPEndpoint *other = TCPEndpoint *other =
fEndpointHash.Lookup(endpoint->LocalAddress().GetPort()); fEndpointHash.Lookup(endpoint->LocalAddress().Port());
if (other != endpoint) { if (other != endpoint) {
// remove endpoint from the list of endpoints with the same port // remove endpoint from the list of endpoints with the same port
while (other != NULL && other->fEndpointNextWithSamePort != endpoint) while (other != NULL && other->fEndpointNextWithSamePort != endpoint)
@@ -254,7 +254,7 @@ UdpDomainSupport::CheckBindRequest(sockaddr *address, int socketOptions)
break; break;
TRACE_DOMAIN(" ...checking endpoint %p (port=%u)...", otherEndpoint, TRACE_DOMAIN(" ...checking endpoint %p (port=%u)...", otherEndpoint,
ntohs(otherEndpoint->LocalAddress().GetPort())); ntohs(otherEndpoint->LocalAddress().Port()));
if (otherEndpoint->LocalAddress().EqualPorts(address)) { if (otherEndpoint->LocalAddress().EqualPorts(address)) {
// port is already bound, SO_REUSEADDR or SO_REUSEPORT is required: // port is already bound, SO_REUSEADDR or SO_REUSEPORT is required:
@@ -340,7 +340,7 @@ UdpDomainSupport::_DemuxBroadcast(net_buffer *buffer)
TRACE_DOMAIN(" _DemuxBroadcast(): checking endpoint %s...", TRACE_DOMAIN(" _DemuxBroadcast(): checking endpoint %s...",
AddressString(fDomain, *endpoint->LocalAddress(), true).Data()); AddressString(fDomain, *endpoint->LocalAddress(), true).Data());
if (endpoint->LocalAddress().GetPort() != incomingPort) { if (endpoint->LocalAddress().Port() != incomingPort) {
// ports don't match, so we do not dispatch to this endpoint... // ports don't match, so we do not dispatch to this endpoint...
continue; continue;
} }
@@ -441,7 +441,7 @@ UdpDomainSupport::_GetNextEphemeral()
break; break;
} }
endpointPort = endpoint->LocalAddress().GetPort(); endpointPort = endpoint->LocalAddress().Port();
TRACE_DOMAIN(" _GetNextEphemeral(): checking endpoint %p (port %hu)...", TRACE_DOMAIN(" _GetNextEphemeral(): checking endpoint %p (port %hu)...",
endpoint, ntohs(endpointPort)); endpoint, ntohs(endpointPort));