mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Rename these to make more sense.
This commit is contained in:
@ -104,12 +104,12 @@ plString plNetAddress::GetHostString() const
|
||||
|
||||
uint32_t plNetAddress::GetHost() const
|
||||
{
|
||||
return ntohl(fAddr.sin_addr.s_addr);
|
||||
return fAddr.sin_addr.s_addr;
|
||||
}
|
||||
|
||||
uint32_t plNetAddress::GetHostBE() const
|
||||
uint32_t plNetAddress::GetHostLE() const
|
||||
{
|
||||
return fAddr.sin_addr.s_addr;
|
||||
return ntohl(fAddr.sin_addr.s_addr);
|
||||
}
|
||||
|
||||
plString plNetAddress::GetHostWithPort() const
|
||||
@ -128,14 +128,14 @@ bool plNetAddress::SetHost(const char* hostname)
|
||||
|
||||
bool plNetAddress::SetHost(uint32_t addr)
|
||||
{
|
||||
fAddr.sin_addr.s_addr = htonl(addr);
|
||||
memcpy(&fAddr.sin_addr, &addr,sizeof(addr));
|
||||
fAddr.sin_family = AF_INET;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool plNetAddress::SetHostBE(uint32_t addr)
|
||||
bool plNetAddress::SetHostLE(uint32_t addr)
|
||||
{
|
||||
memcpy(&fAddr.sin_addr, &addr,sizeof(addr));
|
||||
fAddr.sin_addr.s_addr = htonl(addr);
|
||||
fAddr.sin_family = AF_INET;
|
||||
return true;
|
||||
}
|
||||
|
@ -95,10 +95,10 @@ public:
|
||||
bool SetPort(uint16_t port);
|
||||
|
||||
uint32_t GetHost() const;
|
||||
uint32_t GetHostBE() const;
|
||||
uint32_t GetHostLE() const;
|
||||
bool SetHost(const char* hostname);
|
||||
bool SetHost(uint32_t ip4addr);
|
||||
bool SetHostBE(uint32_t addr);
|
||||
bool SetHostLE(uint32_t addr);
|
||||
|
||||
const AddressType& GetAddressInfo() const { return fAddr; }
|
||||
AddressType& GetAddressInfo() { return fAddr; }
|
||||
|
Reference in New Issue
Block a user