node/docfetcher.js
// fetch the top document in providers
fetch the top document in providers
fetch the top document in providers
function fetch_top(hash){
    if (this.docs_being_fetched[hash].providers.length < 1)
        return this.unavailable(hash);
    this.docs_being_fetched[hash].contacted = -1; 
    var self = this;
    process.nextTick(function(){
        self.docs_being_fetched[hash].contacted = new Date();
        self.conmgr.send(self.docs_being_fetched[hash].providers[0], 
                         JSON.stringify({ 'command' : 'FETCH', 'hash' : hash }));
    });
}
function fetch_top ( hash ) { if ( this . docs_being_fetched [ hash ] . providers . length < 1 ) return this . unavailable ( hash ) ; this . docs_being_fetched [ hash ] . contacted = - 1 ; var self = this ; process . nextTick ( function ( ) { self . docs_being_fetched [ hash ] . contacted = new Date ( ) ; self . conmgr . send ( self . docs_being_fetched [ hash ] . providers [ 0 ] , JSON . stringify ( { 'command' : 'FETCH' , 'hash' : hash } ) ) ; } ) ; }
fetch the top document in providers
fetch the top document in providers
//if list is empty, send UNAVAILABLE response to every con_id in awaiting // being contacted