I have written code to connect to a server using QSocket. I am able to connect if i give the IP address of the server in the 'connectToHost()' method of QSocket.
Now Suppose if i want to give the server computer name in place of the IP address and still get connection, how do i do that.
First of all can I do so?
Its smthing like suppose the server name is "abcxyz" and IP is 192.168.4.168....
i can connect by connectToHost("192.168.4.168", 8080)
But can I connect using connectToHost("abcxyz", 8080) .
If so how can i do this. If i directly give the name it was giving some exception.
Please Help