Results 1 to 4 of 4

Thread: IP Caching

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Smile IP Caching

    hi all

    is there any way to ip caching in Qt ??

    regards
    Life is about making the right decisions and moving on.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: IP Caching

    Sure.
    Just do the host address lookup manually using QHostInfo and save the host name -> host address mapping in a QHash or QMap.
    Then check this container for cached lookups before creating sockets or URLs

    Cheers,
    _

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: IP Caching

    ... just bear in mind such caching might get you nowhere because the same name might resolve to different IPs every time you resolve the address. As far as I can see Qt has no facilities to determine when to expire the cache (it does allow to resolve one name to more than one IP though so at least there you should be safe).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Default Re: IP Caching

    thanks Mr wysota for your replying.
    Life is about making the right decisions and moving on.

Similar Threads

  1. Caching of QPushButton embedded in QGraphicsScene
    By matthias_ in forum Qt Programming
    Replies: 3
    Last Post: 1st October 2010, 19:31
  2. How to using/setting the font caching
    By iceman in forum Newbie
    Replies: 5
    Last Post: 28th July 2010, 05:35
  3. password caching method
    By ramazangirgin in forum Qt Programming
    Replies: 2
    Last Post: 30th June 2009, 09:20
  4. QPixmap caching?
    By gfunk in forum Qt Programming
    Replies: 3
    Last Post: 11th August 2006, 22:46
  5. Caching QAbstractProxyModel dilemma
    By Alessandro in forum Qt Programming
    Replies: 2
    Last Post: 11th April 2006, 19:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.