News:

Holy shit, it's 2018 2019 2020 2021 2022 2023 2024, and the US isn't a fascist country! What a time to be alive. Well, shit.

Main Menu

[Java] Select the fastest mirror in a group of addresses

Started by Chavo, September 11, 2007, 02:01:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chavo

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!

Joe

Quote from: Chavo 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!

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.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


iago

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.

Camel

Quote from: Chavo on September 11, 2007, 03:13:41 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"

/**
* 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!