473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 1961
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christian von Essen | last post by:
Hi, As I don't know if my problem is python, platform or non-specific, I try to post my question here, as you may have made similar experiences. I try to write a simple chatserver, using the...
3
by: ssantamariagarcia | last post by:
I am trying to program a server in C for UNIX to get a kind of "bridge" between the clients of a port A and the clients of a port B. For that, I create 2 processes: one that listen the requests of...
6
by: John J. Hughes II | last post by:
My code starts a TCP/IP socket listener and waits for incoming connections. This works fine on my system and my test system but I have a customer who say it does not work on their system. As far...
0
by: Vladimir Lushnikov | last post by:
Hi, I'm experimenting with the Seqpacket protocol, because the connectionless protocols aren't enough for my needs, and TCP/IP doesn't preserve message boundaries. This is what I've currently...
2
by: Lenard Gunda | last post by:
Hi, I have the following problem when I am working with sockets in C#. I do not remember running into the same problem some while ago, when working with sockets from C++ (using native code, not...
6
by: kai | last post by:
Hi, I was tring to run an example (HelloWorld.aspx) from MSPrss book, I get this message: "ASP.NET Development Server faild to start listening port 1034. Error message: An attempt was made...
3
by: Laszlo Csabi | last post by:
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...
10
by: ThunderMusic | last post by:
Hi, I'm currently working with sockets. I accept connections using m_mySocket.Listen(BackLogCount); But when I want to stop listening, I shutdown all my clients and call m_mySocket.Close(), but it...
5
by: rome ez | last post by:
I am trying to write a vb.net socket application which listens for clients on two ports simultaneously. Is it possible to do so and how can this be done. Please help.
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.