Results 1 to 2 of 2

Thread: QUdpSocket using server name not ip

  1. #1
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QUdpSocket using server name not ip

    Can I connect to server using QUdpSocket by server name not server ip ?

    Example :

    Qt Code:
    1. QhostAddress serverAddress("qtcentre.org");
    2. QUdpsocket mySocket;
    3. mySocket.bind(serverAddress , 8080);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    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: QUdpSocket using server name not ip

    You can use QHostInfo to translate between name and IP.
    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.


  3. The following user says thank you to wysota for this useful post:

    ahmedalaa (30th January 2012)

Similar Threads

  1. QUdpSocket using server name not ip
    By ahmedalaa in forum Qt Programming
    Replies: 0
    Last Post: 24th January 2012, 08:00
  2. QUdpSocket Echo server
    By hubipet in forum Qt Programming
    Replies: 0
    Last Post: 27th September 2011, 10:16
  3. [TCP Server] Server only sending when terminating
    By papperlapapp in forum Qt Programming
    Replies: 0
    Last Post: 6th December 2010, 19:41
  4. UDP - QUdpSocket
    By denwelzie in forum Qt Programming
    Replies: 7
    Last Post: 29th April 2008, 09:02
  5. QUdpSocket binding
    By db in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2008, 11:24

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.