PDA

View Full Version : QUdpSocket using server name not ip



ahmedalaa
24th January 2012, 08:37
Can I connect to server using QUdpSocket by server name not server ip ?

Example :



QhostAddress serverAddress("qtcentre.org");
QUdpsocket mySocket;
mySocket.bind(serverAddress , 8080);

wysota
25th January 2012, 21:39
You can use QHostInfo to translate between name and IP.