![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4
![]() |
chatting
hey dudes!!
i worte a chat program. when you run it, it asks for an ip address of the server(all the clients connect to the server which then the receives a message and sends it to all the other clients). the problem i'm having is over the internet. i don't really have a real internet server to run my server app on my pc. i log in fine on my pc, but my girlfriend can't connect. how will i get this to work? we connect through different service providers. i'll check if it works through a network... hang on... yip. works fine. so we know now that it works, but not over the internet. any suggestions? thanks. ![]()
__________________
There's got to be more to life than being really, really ridiculously good looking |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4
![]() |
I'm guessing you have a LAN at home (your WAN connection goes into a router which connects to your computer). This means that your computer will have an LAN IP address - probably something like 192.168.0.x
This address is usable only on the LAN (from other computers in your house etc.). You need to use your WAN IP if you want outsiders to connect to you. Keep in mind, this IP address will likely be tentative as you probably don't have an ISP that gives you a static one. p.s. Your outside IP address is really the address of the router. Depending on your router settings, requests sent to it without specific routing information will not make it to your computer or they might be forwarded to all machines on your LAN. You would probably want the latter in this case. I assume you are using a funky port number for your chat server and the other computers on your LAN wont be listening on that port, so it's not a big deal.
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand." - B. Russell http://web.bryant.edu/~srk2 |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Even if you have a dynamic IP, you might luck out. Ours was the same for two years, until we switched to VOIP. Unless you work out some name service, just send your chatters the IP/port number to use. I have had success with that when opening up my server (for very limited times) for client demos. Port forward your router as appropriate.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Professional Programmer
|
If you're on a network just set up the server on a local machine, then forward the port on the router and send out the router IP as the server to connect to
|
|
|
|
|
|
#5 |
|
Programmer
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4
![]() |
on some websites they log your ip address, so i used the one there. 196.25.... but that didn't work. i thought about me being on a lan, so i emailed her the server app and an app that dislays your ip(on mine it only shows my lan ip -> 172.16...). on her forum, it logs ip addresses as well and there it was a different one(150.... or something there)to the one my ip app showed(19something....). if she used the one my app showed her, then she could log into the server which was running on her pc, but the forum's ip didn't allow it.
she could log into the server on her own pc, but if i tried from here, then it didn't allow me.
__________________
There's got to be more to life than being really, really ridiculously good looking |
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
You need to use a Free DNS service and an IP updater. There are Free DNS services, like DynDNS.org with everything you need. Some hardware routers even have the updater built in! (i.e. NetGear) I have a domain name, and ZoneEdit points to it for me for free (ToilNTrouble) . I run a script that updates the IP whenever my router redials. My WebServer, Nameserver and sFTP server all work just like I would be on a perm IP.
* The some free redirection services don't suffice, because only port 80 is forwarded.
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
#7 |
|
Highly Adaptive Penguin
Join Date: May 2005
Location: United States
Posts: 252
Rep Power: 4
![]() |
this is totally irrelevent, but does anyone know any good java networking sites
|
|
|
|
|
|
#8 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
Start your own thread about that.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|