|
-
Oct 20th, 2003, 11:29 AM
#1
Thread Starter
Addicted Member
*** SOLVED *** very very simple sockets ( TCP Client ) question
for connecting to another computer in a workgroup by name using sockets , which one should we use >>
1 )
TCPClient.Connect("\\ServerName",6000)
or
2 )
Dim ipAddress As IPAddress = Dns.Resolve("\\ServerName"").AddressList(0)
TCPClient.Connect(ipAddress,6000)
any help will be appreciated, thanks
Last edited by persianboy; Oct 20th, 2003 at 12:44 PM.
-
Oct 20th, 2003, 11:35 AM
#2
Thread Starter
Addicted Member
i think it should be the first one, the reason asking was is because its not connecting using the first way, so i want to make sure the connection has no problem, then search other things to find the bug, so which way is it?
thanks
-
Oct 20th, 2003, 12:08 PM
#3
Thread Starter
Addicted Member
lets just put the question in this way >>
knowing the computer name in a workgroup, how can we find its ip address or host name ?
thanks
-
Oct 20th, 2003, 12:20 PM
#4
Your code is right the only thing about it is that you have the name as a Path and it should be just the computer name. So no "\\" before it.
Dim ip As Net.IPAddress = Net.Dns.Resolve("mhc_pdc").AddressList(0)
-
Oct 20th, 2003, 12:39 PM
#5
Thread Starter
Addicted Member
thankssssssssssssssssssssssss , problem solved, i was going mad trying other things , thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|