Author Topic: [Java] Select the fastest mirror in a group of addresses  (Read 7397 times)

0 Members and 1 Guest are viewing this topic.

Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: [Java] Select the fastest mirror in a group of addresses
« Reply #15 on: September 12, 2007, 07:58:44 pm »
When I was doing a bit of research (mostly to see if it had already been done), it appeared you can also auto-optimize mirrors using DNS.  Of course, that has to be done by the domain owner.  I don't think battle.net is doing this or my class above would be returning the first result nearly every time!

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [Java] Select the fastest mirror in a group of addresses
« Reply #16 on: September 13, 2007, 12:30:25 am »
When I was doing a bit of research (mostly to see if it had already been done), it appeared you can also auto-optimize mirrors using DNS.  Of course, that has to be done by the domain owner.  I don't think battle.net is doing this or my class above would be returning the first result nearly every time!

Not to mention, StarCraft wouldn't be acting the way it does. :P

@iago: If they closed the socket, or destroyed it, after receiving the first SYNACK, then the one would send an ACK and the rest would be ignored, right? I'm rather sure that's whats happening.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [Java] Select the fastest mirror in a group of addresses
« Reply #17 on: September 17, 2007, 04:23:58 pm »
The Starcraft program doesn't know when it receives the SYNACK, all it knows is when the connection is "established". Don't forget that Starcraft operates on the application layer, where the concepts are connected/disconnected/etc. What you're thinking of is the TCP layer, where the states are SYN_SENT and SYN_RECEIVED and other lower level stuff.

So in other words, no, Starcraft isn't doing that. And plus, I've reversed that portion, and I assure you that it's just a naked, classic, connect() syscall.

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: [Java] Select the fastest mirror in a group of addresses
« Reply #18 on: September 21, 2007, 04:35:52 pm »
spiffy, make sure you give yourself credit too!

That's what the $Id$ tag is for; it's roughly equivalent to "filename revision date author"

Code: [Select]
/**
 * This file is distributed under the GPL
 * $Id: MirrorSelector.java 686 2007-09-11 18:53:33Z scotta $
 */

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!