Page 3 of 3 First 123
  • Jump to page:
    #31
  1. It Doesn't Work!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Slovenia
    Posts
    112
    Rep Power
    12

    Thumbs up


    Whoa, man, that's amazing. It works perfectly - it's written in c++, but compiled in Lcc without errors...

    It is NOT written in c++. That's why compiled so good :)
    Last edited by Loser; August 31st, 2003 at 10:20 AM.
  2. #32
  3. It Doesn't Work!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Slovenia
    Posts
    112
    Rep Power
    12
    Just another question:

    Is there a way to determine which IP address from the list is "outside" - to address a computer over the internet?
  4. #33
  5. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,253
    Rep Power
    2222
    Originally posted by Loser
    Just another question:

    Is there a way to determine which IP address from the list is "outside" - to address a computer over the internet?
    That is a trickier problem. The "easy" solution would be to write a server that responds with the client's IP address and install it on a computer on the "outside" of your gateway router -- talking somebody into running it on their server would be the tricky part. Or you could create a web page with CGI that can do the same (if your ISP allows you to have a site, then you should not need permission except to upload CGI -- I'll have to check to see if Javascript can do it too). Or else rely on similar web pages already out there.

    Infamous has started a thread addressing this problem, in which he's looking at a variant of the traceroute utility. I'm not sure how far he's gotten yet.
  6. #34
  7. It Doesn't Work!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Slovenia
    Posts
    112
    Rep Power
    12
    Huh, it's not so important. If this is so complicated, I'll just write all addresses and then the user will have to try a little. In the end, he's not as stupid as I am. :)
  8. #35
  9. It Doesn't Work!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Slovenia
    Posts
    112
    Rep Power
    12
    What's the most optimal "packet" (string) size (length) to send over tcp?
  10. #36
  11. I'm Baaaaaaack!
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    5,538
    Rep Power
    244
    Are you trying to build your own packets or just send data? If you are sending data from an application, just send as much as you have at any given time and the underlying levels will break them into acceptable sizes. If you are trying to build your own packets (why?), then you still don't have a lot of control because the maximum packet size depends on the route betwixt you and your destination. Unless you set the 'do not fragment' flag in your packet, it will be broken into the smallest size that can be accomodated by the route your packets happen to take (which can vary, even during a single transaction).

    The easy answer is: What ever size your buffer is (keeping in mind that bigger is better, it is a dumb idea to send it one byte at a time, though the lower layers may wait a bit to accumulate data).

    My blog, The Fount of Useless Information http://sol-biotech.com/wordpress/
    Free code: http://sol-biotech.com/code/.
    Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
    Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.
    LinkedIn Profile: http://www.linkedin.com/in/keithoxenrider

    It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
    --Me, I just made it up

    The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
    --George Bernard Shaw
  12. #37
  13. It Doesn't Work!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Slovenia
    Posts
    112
    Rep Power
    12
    Don't worry, I won't build my own packets. :)
    So 16384 bytes is OK?
    Thanks for the answer.
  14. #38
  15. I'm Baaaaaaack!
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    5,538
    Rep Power
    244
    I use exactly the same buffer size. Sometimes, when testing a client/server pair on the same computer, it even transmits and recieves that number of bytes. I imagine (though haven't looked) that the actual packet size is much smaller (if I recall, the stated maximum TCP packet size is 1,500 bytes). Still, since the underlying socket implementation is supposed to take care of all that for you, it doesn't make you no nevermind.

    The idea is to give the socket layer data in chunks at least the size of a packet so that it doesn't send a bunch of tiny packets (it takes almost as long to send one byte as a full sized packet).

    My blog, The Fount of Useless Information http://sol-biotech.com/wordpress/
    Free code: http://sol-biotech.com/code/.
    Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
    Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.
    LinkedIn Profile: http://www.linkedin.com/in/keithoxenrider

    It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
    --Me, I just made it up

    The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
    --George Bernard Shaw
  16. #39
  17. It Doesn't Work!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Slovenia
    Posts
    112
    Rep Power
    12
    I think this topic should end now. :)
    Again, thanks for the answers.
Page 3 of 3 First 123
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo