Results 1 to 3 of 3

Thread: Winsock / TCPClient/ Sockets question??[Closed..Asking worng]

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Winsock / TCPClient/ Sockets question??[Closed..Asking worng]

    I have an app in VB6 that queries servers for info...

    I want to try to do this in VB.net (im am teaching myself vb.net)

    I know I could use winsock ..but have read about tcpCLient and systems.socket (or something like that)

    How do I "add" either of these in? which should I use? Help!

    I cant seem to find either in references or controls? am I missing something?

    thanks
    Last edited by Static; Feb 21st, 2003 at 10:09 PM.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    ANyone?

    I have tried this:

    Dim TCP as New System.Net.Sockets.TCPClient
    TCP.Connect(TextBox1.Text, 7788)


    But I cant seem to connect...any IP I use refuses it?

    ERROR:
    "An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll

    Additional information: No connection could be made because the target machine actively refused it"

    Help??


    Another Question:

    How do u use the TRY / Catch?

    I want to catch the error of no response from server..MSGBOX..then....exit out of the sub to allow a new IP to be entered?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    If you want to trape an error use this

    try
    ' your code

    catch x as exception
    msgbox x.message
    end try

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