471,349 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Listening socket problem

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

Jul 22 '05 #1
3 1819
Hi Laszlo,

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

"Laszlo Csabi" <lc@ynotcallme.com> wrote in message
news:eg**************@TK2MSFTNGP14.phx.gbl...
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

Jul 22 '05 #2
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" wrote:
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

Jul 22 '05 #3
"Laszlo Csabi" <lc@ynotcallme.com> wrote in
news:eg**************@TK2MSFTNGP14.phx.gbl:
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/
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Christian von Essen | last post: by
3 posts views Thread by ssantamariagarcia | last post: by
6 posts views Thread by John J. Hughes II | last post: by
reply views Thread by Vladimir Lushnikov | last post: by
6 posts views Thread by kai | last post: by
3 posts views Thread by Laszlo Csabi | last post: by
10 posts views Thread by ThunderMusic | last post: by
5 posts views Thread by rome ez | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.