Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Jul 2008
    Posts
    44
    No no i was testing it on myself and if i use the internel one(LAN) then it doesnt work with anyone outside the net :/...

  2. #12
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    Well, almost certainly incoming connections can and will be blocked by a firewall anyway. But then you were talking wan, not internet - theres greater chance for less firewall on a wan. You cant assume ports will be open for a return connection.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  3. #13
    Join Date
    Jul 2008
    Posts
    44
    Hmm then do you have any idea on how to connect to someone using wan ?
    I heard on the net something about reverse connection :S ?
    Pleas help me cause i want to make a internet application that everyone in the world can use.

  4. #14
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    Ok. lets clear up the term "WAN"

    WAN - Wide area network - implies that it is a company / group of companies based network. If you need ports opened technically you can get them opened so applications work (in a business obviously you may need to make a business case for it, but assuming you had valid reason it would most likely happen)

    Difference between WAN and LAN : LAN = a small area, generally 1 network, eg if your IP was 192.168.x.x so is everyone elses. With a WAN, there can be a large number of different subnets, however, there will be routing involved, there can be outages, there can be firewalls.

    This is not the same as using the internet.
    For example:

    If you were to want to connect to me, you'd be fat out of luck. We have very few open ports to our LAN, in fact I could probably name them all now.

    However, even here at work if I wrote a chat app or such, if I wanted it to work outside of the area of the LAN Im on, it almost certainly wouldnt. as we have more firewalls than a firewall seller, its great fun.

    So, stop talking WAN if you're talking about making an app that works over the internet, you dont have influence over the internet.

    So, if you have a chat app or whatever and you're trying to talk to your buddy, both of you need to make sure various firewall issues are sorted at your respective ends.

    If both of you dont have fixed IP you need to have a way to establish initial connection - hence apps like IMs have a central server you make contact to, and then when youw want to talk to your buddy it can try and connect from you to him direct, if that then fails the server can often relay between you as you both can talk to it, but not direct to each other.

    You need to plan out the logic of how its going to work given that you cannot guarentee a port number is open, or that people can make direct connections to each other, or that if a person can connect out, someone will be able to make a connection back.

    Again for example:
    I can pretty much make any connection out on any port I like from home.
    But, as I said before, only a small number of ports in are allowed.

    Plan it out on paper, work out how you expect it to work - if you dont have the logic, you'll either end up with no app or a bad one.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  5. #15
    Join Date
    Jul 2008
    Posts
    44
    Hmmm, i heard somewhere 2 programs cant use thesame port :S is that true and how do i let me application connect with the internet(so when you enter someone ip you can connect there client to my server)
    Thanks in advance.

  6. #16
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    2 programs cant listen on the same port no.
    2 programs can connect to the same port however (hence you can browse multiple websites or make multiple connections to things)

    If your app say listens on port 4000 and you connect to your mate, he can connect back to you on 4000 too, so the same app will work, because its not the same machine.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  7. #17
    Join Date
    Jul 2008
    Posts
    44
    Hmm ok, thats allot better...
    but for some reason my program connects to the ip and 2 seconds later it dissconnects...
    here is my server starting code
    ServerSocket1.Port := 80;
    ServerSocket1.Active := True;

    and here is my client connecting code
    ClientSocket1.Port := 80;
    ClientSocket1.host := edit2.text;
    ClientSocket1.Active := true;

    What am i ding wrong here?
    (the problem is that it wont connect to my external ip)

  8. #18
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    You can get very odd results if you try and access your own external IP.
    ok, if it connects and 2 seconds later it disconnects, either something in your code tells it to, or the connections not actually made, it just starts to try.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  9. #19
    Join Date
    Jul 2008
    Posts
    44
    i use only those codes i set earlier and i tried it with a friend and it gave thesame results...i dont know what the problem is :S .
    can you pleas help me make my chat client connect to my server?
    thanks.

  10. #20
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    You want a chat app, you make it - Im not your mother.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •