Click here to Skip to main content
16,016,180 members
Please Sign up or sign in to vote.
2.83/5 (4 votes)
See more:
hi,


I have a main server ipv4 180.***.***.***(external ip)
and ive connected many clients to this server.
an one of the client 192.168.1.1
how to connect to this client using the external ip.
Plz help.


Thanks
Andrew
Posted
Comments
Mitchell J. 8-Mar-14 23:46pm    
Hello Andrew!

For people to help you out you'll have to provide some more information.
Eg. Are you having error messages? Couuld you post them? What have you tried that isn't working? :-)

If you don't do this I think the down-vote trolls will start attacking your question.

"Connect to client" is neither possible nor impossible. This is just the oxymoron. Client connects to server, and the server and client send/receive messages in both directions, or on one direction, does not matter. Hence, the server needs to have IP known to the client, accessible to this client. And client needs the port number. Client's IP address is totally irrelevant.

—SA
 
Share this answer
 
Server doesn't ask client that "Please come and connect with me". It is the client that connects to the server. Therefore Client must have the IP of the server, which you have already. And the server must have IP known to the client and client must have the port number.

And to address your problem, if you want that your server can connect to the client, then your client should have such mechanism (i.e Proxy) that it can behave like server and the server behaves like it is a client.

The proxy of the client-server needs to be there on both the side in order to achieve something like whatever you're trying to say.

-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900