mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Resolve client host name using DNS.
This operation is blocking and should be made asynchronous.
This commit is contained in:
parent
659ef87974
commit
48df667a37
@ -437,7 +437,7 @@ IpAddress::~IpAddress()
|
||||
void IpAddress::Set( const struct sockaddr& addr )
|
||||
{
|
||||
auto ai = (const struct sockaddr_in*)&addr;
|
||||
inet_ntop( AF_INET, &ai->sin_addr, m_text, 17 );
|
||||
getnameinfo( &addr, sizeof( sockaddr_in ), m_text, 64, nullptr, 0, NI_NOFQDN );
|
||||
m_number = ai->sin_addr.s_addr;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
|
||||
private:
|
||||
uint32_t m_number;
|
||||
char m_text[17];
|
||||
char m_text[64];
|
||||
};
|
||||
|
||||
class UdpListen
|
||||
|
Loading…
Reference in New Issue
Block a user