C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 08-22-2005, 12:49 PM   #1
Politics&Cpp geek
 
Da-Nuka's Avatar
 
Join Date: Oct 2004
Posts: 104
Programs requires portforwarding

Hello.
Some time ago, i made a chatprogram.
It could both listen on a port for inncomming connections, or send a connection request.

It worked fine on my LAN, but it did not work on the internett.
It was not the firewall, so i guess it is that it needs port-forwarding!

But...how the HECK do other programs make their programs work without forwarding?
__________________
http://livebad.com/nuka
Da-Nuka
Da-Nuka is offline   Reply With Quote
Old 08-22-2005, 02:12 PM   #2
* Death to Visual Basic *
 
Devil Panther's Avatar
 
Join Date: Aug 2001
Posts: 768
can you please explain what do you mean by port-forwarding...
do you have some local router and you are working with NAT or something like that?
__________________
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

http://www.Bloodware.net - Developing free software for the community.
Devil Panther is offline   Reply With Quote
Old 08-23-2005, 06:16 PM   #3
Registered User
 
Join Date: Nov 2001
Posts: 1,348
Well, how does the app not work outside of your network?

Kuphryn
kuphryn is offline   Reply With Quote
Old 08-25-2005, 08:33 PM   #4
Registered User
 
Join Date: Sep 2004
Location: California
Posts: 3,020
Quote:
But...how the HECK do other programs make their programs work without forwarding?
If an app requires an incomming connection, then port forwarding will be necessary.

The way other apps get around this, is they don't require incomming connnections. Popular chat programs like AIM or ICQ use a centralized server to handle communication traffic. So instead of user1 making a direct connection to user2, both users connect to the server. A user then sends a chat message to the server, and the server sends that chat message to the recipient.
bithub is offline   Reply With Quote
Old 08-28-2005, 08:40 AM   #5
Politics&Cpp geek
 
Da-Nuka's Avatar
 
Join Date: Oct 2004
Posts: 104
Thanks, bithub, finaly someone who understands my question and answerd just perfect

...what about MSN-file-sharing?
Cant the speed of sharing files be speeded up a lot, by doing user1 connect to user 2, instead of doing it thorugh a server?
(What is the case in MSN filesharing?)
__________________
http://livebad.com/nuka
Da-Nuka
Da-Nuka is offline   Reply With Quote
Old 08-28-2005, 12:41 PM   #6
Registered User
 
Join Date: Sep 2004
Location: California
Posts: 3,020
Quote:
Cant the speed of sharing files be speeded up a lot, by doing user1 connect to user 2, instead of doing it thorugh a server?
Yes, a direct connection would speed up the transfer since the data doesn't have to be routed through the server. A direct connection requires that at least one of the users has their ports forwarded though.

Quote:
(What is the case in MSN filesharing?)
I'm not familiar with MSN filesharing, so I can't really answer that. I know that most chat programs that have filesharing use direct connections instead of routing the file transfer through the server. The reason behind this is that it would be too much of a load on the server if it had to handle all the filesharing packets as well as the regular chat packets.
bithub is offline   Reply With Quote
Old 08-28-2005, 12:45 PM   #7
* Death to Visual Basic *
 
Devil Panther's Avatar
 
Join Date: Aug 2001
Posts: 768
MSN is not like the IRC DCC, the last time I checked it's not direct, but goes thruogh the server.
You can check this for yourself by simply looking at the connections with the netstat command or capture the packets with a sniffer.
__________________
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

http://www.Bloodware.net - Developing free software for the community.
Devil Panther is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting the matrix question.. transgalactic2 C Programming 47 12-22-2008 03:17 PM
Recommend upgrade path for C programs emanresu C Programming 3 11-22-2007 07:32 AM
I never Finish my programs :( epidemic C++ Programming 11 04-02-2007 12:35 PM
POSIX/DOS programs? nickname_changed C++ Programming 1 02-28-2003 05:42 AM
executing c++ programs on the web gulti01 C++ Programming 4 08-12-2002 03:12 AM


All times are GMT -6. The time now is 03:56 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22