History log of /haiku/headers/os/net/NetworkAddressResolver.h
Revision Date Author Comments
# b140a1c3 21-Nov-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

NetworkAddressResolver: cache needs to be locked

It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.


# f972422c 14-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

Add a simple DNS caching system to BNetworkAddress

netresolv (and libbind) won't cache DNS requests, which can result in a
lot of DNS requests being made for the same host. Implement a simple
cache in RAM (local to each application) which will keep the most
recently requested addresses cached. This can speed up loading of an
HTTP page a lot, by saving a DNS request for each resource stored on the
same server as the main page.


# 836c43f2 12-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Factored out a BNetworkAddressResolver from BNetworkAddress, that also allows
to iterate over all possible addresses, as suggested privately by Rene.
* Added flags to the resolving methods that allow more control over the
addresses returned.
* Added setters to BNetworkAddress that accept a service name instead of port
number, renamed PortName() to ServiceName().
* Made the sockaddr* cast operators return a const sockaddr as it was supposed
to be, although I should probably add non-const ones as well.
* This also simplified the code somewhat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38039 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f972422c66af92a5c6abf9852c904b92ea9255ea 14-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

Add a simple DNS caching system to BNetworkAddress

netresolv (and libbind) won't cache DNS requests, which can result in a
lot of DNS requests being made for the same host. Implement a simple
cache in RAM (local to each application) which will keep the most
recently requested addresses cached. This can speed up loading of an
HTTP page a lot, by saving a DNS request for each resource stored on the
same server as the main page.


# 836c43f2b8f7519aeccdc30ec2804d0c66d56df4 12-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Factored out a BNetworkAddressResolver from BNetworkAddress, that also allows
to iterate over all possible addresses, as suggested privately by Rene.
* Added flags to the resolving methods that allow more control over the
addresses returned.
* Added setters to BNetworkAddress that accept a service name instead of port
number, renamed PortName() to ServiceName().
* Made the sockaddr* cast operators return a const sockaddr as it was supposed
to be, although I should probably add non-const ones as well.
* This also simplified the code somewhat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38039 a95241bf-73f2-0310-859d-f6bbb57e9c96