You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

myfairlady

Beginner

  • "myfairlady" started this thread

Posts: 1

Occupation: Software Engineer

  • Send private message

1

Wednesday, February 2nd 2005, 8:38am

How to get IP address from Computer name

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

wysota

Trainee

Posts: 65

Location: Warsaw, POLAND

  • Send private message

2

Wednesday, February 2nd 2005, 9:14am

RE: How to get IP address from Computer name

Live and let live - use the search engine.
"Use the docs Luke, use the docs!"