Thread: Programs requires portforwarding

  1. #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?

  2. #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.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Well, how does the app not work outside of your network?

    Kuphryn

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    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.

  5. #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?)

  6. #6
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    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.

    (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.

  7. #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.

Popular pages Recent additions subscribe to a feed

Similar Threads

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