CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2009
    Posts
    6

    Question Socket Programming Help...

    Hi Guys, im learning how to use Sockets in C# and im in the process of making a very simple 'MSN Like' Chat application. Its coming along nicely, i've tested it and it works fine on Local Networks like my one at Uni but if i try to connect to someone over the Internet e.g. my friend located on a different network, it doesn't work, the Client is able to connect to the Server, but the messages being sent are not displayed...

    I spoke to my lecturer about this and he said that i would need to set up port forwarding for both machines so that my computer knows what to do/where to send "X information" it gets on "X Port".

    This is really tedious to do, especially for someone thats not so tech savvy, so is there a simple way to do this in code automatically? Sorry if it's a silly question, but im new to Network Programming... :P

    I can add full code to demonstrate what im doing if neccessary... Thanks Guys

  2. #2
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: Socket Programming Help...

    You really need to forward the port in the router. But only on the server machine and not both.

  3. #3
    Join Date
    Sep 2008
    Posts
    69

    Re: Socket Programming Help...

    Dear friend,

    Kindly refer the following given link, it may help to you, try to understood this code what they had done.

    http://www.codeproject.com/KB/IP/chandrasekar.aspx

    With Regards,
    Boopathiraja.N

  4. #4
    Join Date
    Sep 2008
    Posts
    69

    Re: Socket Programming Help...

    Dear dannyStommen,

    I am not seen you are helping to Dudzz, i am really sorry mine inbetween disturbance.

    With regards,
    Boopathiraja.N

  5. #5
    Join Date
    Mar 2009
    Posts
    6

    Re: Socket Programming Help...

    Quote Originally Posted by dannystommen View Post
    You really need to forward the port in the router. But only on the server machine and not both.
    So there really isn't a workaround for this?

  6. #6
    Join Date
    Mar 2009
    Posts
    6

    Re: Socket Programming Help...

    Quote Originally Posted by sathyboopathiraja View Post
    Dear friend,

    Kindly refer the following given link, it may help to you, try to understood this code what they had done.

    http://www.codeproject.com/KB/IP/chandrasekar.aspx

    With Regards,
    Boopathiraja.N

    Thanks for the link, i'll go check it out now.

Tags for this Thread

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

Featured