Results 1 to 7 of 7
Hello,
I have written a Client - Server program in linux using socket programming...
means between two pc's connected directly.. works fine....
but i want to connect a router in ...
- 03-15-2008 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 27
Client-server Proragmming, router connected in between
Hello,
I have written a Client - Server program in linux using socket programming...
means between two pc's connected directly.. works fine....
but i want to connect a router in between the two pcs, means pc1 is connected to LAN port of router and the other is connected to WAN port of router....how can i develop the code for establishing a connected between the pc1 and pc2, connected router in between them..
thanks in advance....
regards
spymate....
- 03-15-2008 #2
There's nothing different you need to do on the server side.
There's also nothing different you need to program on the client side. The only interesting item of information you need on the client side is the proper IP address for reaching the server.
And that piece of information will come as you properly configure the router.
Unfortunately, I have no information about properly configuring the router; I hope someone else jumps in with that. But I can tell you that the presence of a router will not make you need to change any of your application code.--
Bill
Old age and treachery will overcome youth and skill.
- 03-15-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
- 03-17-2008 #4Just Joined!
- Join Date
- Nov 2007
- Posts
- 27
Thanks for the reply....
The point is correct that there will not be much difference of the code with router and without router, if we develop the client server by directly connecting, we will give the ip address of the server in the client and vise-versa, but when connected through router, the router Lan will have one IP address and Router Wan will have one IP address, here i am unable to understand will IP address must be given in the client and the server...........
can u plz help in solving the problem...
thanks in advance...
reguards,
spymate
- 03-17-2008 #5
Your question at this point isn't entirely clear to me. By the time you're done configuring a router, you should have at hand all IP addresses you need.
Have you configured your router? What does your router's configuration look like?--
Bill
Old age and treachery will overcome youth and skill.
- 03-17-2008 #6Just Joined!
- Join Date
- Nov 2007
- Posts
- 27
As per my requirement i have 2 develop a client server application througha router in between them.i have configured the router, i have assigned the ip's for both the lan and the wan ports and the gateway also for the router.
In the client side, normally the ip of the server is given in the client for the establishment of the connection.
but if a router is connected, we will have 3 ips, server ip, router lan ip, router wan ip, and even the gateway of the router...
i am facing the problem here, which ip must be mentioned in the client for the establishing the connection wit the server.
can u plz help me ...
thanks in advance
reguards
spymate
- 03-17-2008 #7
I've never configured a router, so I can't really tell the answer for sure. I'm hoping someone else can jump in here.
But my guess is that you want the server ip, as before.
Don't be afraid to experiment. You have four IP addresses there. You could have tried plugging each into your software (even the ridiculous choices could be tried, so you do all four), and probably have come up with an answer ... oh, two days ago or so. :)if a router is connected, we will have 3 ips, server ip, router lan ip, router wan ip, and even the gateway of the router.
Of course, I could be wrong....--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote
