Listening socket problem

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
 
W

Wencheng Magiya

Hi Laszlo,

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

Guest

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.
 
C

Chad Z. Hower aka Kudzu

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top