Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 20th, 2005, 6:35 PM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,840
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Socket module

Okay, so I'm working on a little Networking with Python using the 7.2.3 example on python.docs.

To test it I switched it to:

server
host - "compaq"
port - 2222

client
host - 192.168.0.xxx
port - 2222

And it worked, because for host I put the network IP.

But when I try to replace the network IP with my internet IP (so people from outside my network can access it), the client times out. I've tried replacing the server's hostname with the internet IP, tried changing ports. I've tried switching client/server with friends. Made sure no firewall is up.

Can someone give me a working example for two computers outside of the same network?
Sane is offline   Reply With Quote
Old Nov 20th, 2005, 8:39 PM   #2
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,630
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
you sure you dont have to do any port fowarding in your router? (that is if you have a router)
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Nov 20th, 2005, 8:43 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,840
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Yes, I have a router. But as I said, I've tried switching client/server sides with my friends.
Sane is offline   Reply With Quote
Old Nov 20th, 2005, 9:12 PM   #4
B3TA_SCR1PT3R
Hobbyist Programmer
 
B3TA_SCR1PT3R's Avatar
 
Join Date: Jul 2005
Location: Dallas, Texas
Posts: 101
Rep Power: 0 B3TA_SCR1PT3R is an unknown quantity at this point
Send a message via AIM to B3TA_SCR1PT3R
this might be of some help:
http://www.portforward.com/english/r...outerindex.htm
__________________
Hoes telling me to calm down but I'm like fuck that shit!
B3TA_SCR1PT3R is offline   Reply With Quote
Old Nov 20th, 2005, 9:28 PM   #5
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Quote:
Originally Posted by Sane
Yes, I have a router. But as I said, I've tried switching client/server sides with my friends.
Ok. Does your friend have a router then?
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Nov 21st, 2005, 9:39 AM   #6
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,840
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Why does a router matter anyways? Like I didn't think playing an online game was connected any differently with a router then without. Shouldn't that apply to the socket module as well. If not, then what's the solution?
Sane is offline   Reply With Quote
Old Nov 21st, 2005, 10:30 AM   #7
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
If you're behind a NAT, then you can connect to computers through your router, but they cannot connect back to you. The typical way to solve this problem is port forwarding; you tell your router to forward all incoming connections on the port X to your localmachine.

For instance, my router forwards port 22 to my Linux-based NSLU2.
Arevos is offline   Reply With Quote
Old Nov 21st, 2005, 10:41 AM   #8
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,840
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
But if I'm trying to sell this product, I don't want to make all my customers have to forward a port if they have a router.
Sane is offline   Reply With Quote
Old Nov 21st, 2005, 11:07 AM   #9
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Well, anyone who's hosting the game will have to forward a port... how many people are gonna be doing that? And if they are, you'd hope they'd know enough to do that already.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 21st, 2005, 1:29 PM   #10
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,840
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Nah, it's for a Remote PC Accessing program. So the program is for someone who wants to be able to access their computer from a distant location without having to worry about uploading crap, or paying for a domain name. This need applies to a lot of people, including those who had no clue port forwarding existed (IE, me).


And I'm also using the same framework for an FTP emulator under similar circumstances.
Sane is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:06 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC