Click to See Complete Forum and Search --> : Socket Programming Help...


Dudzzz
March 9th, 2009, 06:19 AM
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

dannystommen
March 9th, 2009, 06:41 AM
You really need to forward the port in the router. But only on the server machine and not both.

sathyboopathiraja
March 9th, 2009, 06:47 AM
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

sathyboopathiraja
March 9th, 2009, 06:53 AM
Dear dannyStommen,

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

With regards,
Boopathiraja.N

Dudzzz
March 9th, 2009, 09:30 AM
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? :(

Dudzzz
March 9th, 2009, 09:32 AM
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.