lib/roundabout/rpc/server.rb
#
# Adds a peer to the peer list
#
# Actually, it adds it to the whole grid as every node will start exchanging
# info until they gain identical knowledge of their surroundings.
#
# @param    [String]    url     peer url in the form of host:port
#
Adds a peer to the peer list
Actually, it adds it to the whole grid as every node will start exchanging
info until they gain identical knowledge of their surroundings.
Adds a peer to the peer list Actually it adds it to the whole grid as every node will start exchanging info until they gain identical knowledge of their surroundings .
def add_peer( url )
        peer_urls = @distributor.peer_urls
        return false if peer_urls.include?( url )
        puts "--- [JOIN] #{url}"
        crawler = connect( url )
        peer = connect_to_node( url )
        @distributor.add_peers( crawler )
        peer_urls.each { |p| peer.add_peer( p ){} }
        true
    end
def add_peer ( url ) peer_urls = @distributor . peer_urls return false if peer_urls . include? ( url ) puts "--- [JOIN] #{url}" crawler = connect ( url ) peer = connect_to_node ( url ) @distributor . add_peers ( crawler ) peer_urls . each { | p | peer . add_peer ( p ) { } } true end
Adds a peer to the peer list
Actually, it adds it to the whole grid as every node will start exchanging
info until they gain identical knowledge of their surroundings.
Adds a peer to the peer list Actually it adds it to the whole grid as every node will start exchanging info until they gain identical knowledge of their surroundings .
url
<not_specific>
<not_specific>
url peer url in the form of host:port
url peer url in the form of host : port