Listening socket problem

  • Thread starter Thread starter Laszlo Csabi
  • Start date Start date
L

Laszlo Csabi

Hi guys,

What I would like to achieve is create a client-server messenger
application. The problem I run into is :

I have created a listener socket on the client and connect to the remote
server ( with a another socket ) to login also tell the server what IP and
PORT address the client is listening on, but the IP address an internal IP
and not my public IP address because I'm behind a router. Is there any way I
could connect to the client behind a router without any hussle or any port
forwarding?Also how can I determine th right IP address and port for the
client ?

Could you guys point me out to the right direction ?

Thanks

Laszlo
 
Hi Laszlo,

Just curious, why not use a client socket on the client, a listener socket
on the server?
 
Hello Laszlo,

Generally, Server is kept in the listening mode & client connects to server.
This way server port & IP will remain constant for all clients & server
does not have to worry about client port & ip address.

Please elaborate your requirements of server contacting client ?

Stuart.
 
Laszlo Csabi said:
Is there any way I could connect to the client behind a router without
any hussle or any port forwarding?Also how can I determine th right IP
address and port for the client ?

If its an internal IP you either need to map ap port, or make a call out instead of a call in.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Make your ASP.NET applications run faster
http://www.atozed.com/IntraWeb/
 
Back
Top