Results 1 to 5 of 5

Thread: *** SOLVED *** very very simple sockets ( TCP Client ) question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    *** 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.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    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

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    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)

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    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
  •  



Click Here to Expand Forum to Full Width