Results 1 to 8 of 8

Thread: Please help me understand why this TCP client & server wont connect.

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    Please help me understand why this TCP client & server wont connect.

    Just made this simple TCP client and server with help from a tutorial. Only problem I'm facing now is!

    It can't connect over lan or internet, works perfect hosting a localhost server and connecting to it. It's weird.

    It's programmed in Visual basic 2005 express.

    Projectfiles:

    http://www.stigern.net/Chatter.zip



    Please help me, It's so annoying getting stuck with such a error as this ><

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Please help me understand why this TCP client & server wont connect.

    Just out of curiosity, can you confirm that you don't have a firewall blocking the port you are using?
    My usual boring signature: Nothing

  3. #3
    Member
    Join Date
    Nov 2007
    Posts
    47

    Re: Please help me understand why this TCP client & server wont connect.

    could you post the code for your connecting and accpeting of connection?

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    Re: Please help me understand why this TCP client & server wont connect.

    Firewall is off yes. Both on router and windows.

    qazwsx: look in the projectfiles. Code is there

  5. #5
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Please help me understand why this TCP client & server wont connect.

    Where you catch an exception on connect have you displayed the actual message being generated? That may geive you a idea of the reason the connect is failing.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    Re: Please help me understand why this TCP client & server wont connect.

    Quote Originally Posted by Doogle
    Where you catch an exception on connect have you displayed the actual message being generated? That may geive you a idea of the reason the connect is failing.
    Huh? What do you mean?

  7. #7
    Hyperactive Member
    Join Date
    Sep 2007
    Location
    Sweden
    Posts
    359

    Re: Please help me understand why this TCP client & server wont connect.

    Hi
    I don't have any solution for you, but when I run the app. connection seams to be ok. I can't send message to the server or vice versa. When checking for errors it seams to be something with the StreamReceiver AsyncResult.

  8. #8
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Please help me understand why this TCP client & server wont connect.

    Quote Originally Posted by Stigern
    Huh? What do you mean?
    In your code you have many "Try .. Catch" blocks of code. If the "Catch" code gets executed - ie there is an error of some sort - the Exception Object will contain details about the error. All I was asking, was whether you'd looked at the Message in the Exception Object to see why the Connection failed.
    (I'm not a .NETter so the terminology might not be correct but the principle is. You've gone to all that trouble to detect when an error is generated and then not reported why it happened)
    Last edited by Doogle; Jan 19th, 2008 at 02:11 AM.

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