Sha256: 21d9d1dcb91d093f10bb038cb548c5c2f32ffa501b4fa47242d805d3a5f4af64

Contents?: true

Size: 592 Bytes

Versions: 32

Compression:

Stored size: 592 Bytes

Contents

# for admin keys, how to check network inner visiblity
#
require 'universa'

include Universa

# the key with administrative access to the network in question
access_key = PrivateKey.from_packed open(File.expand_path "~/.universa/test_access.private.unikey", 'rb').read

# set the topology to the network you need
client = client = Client.new topology: 'mainnet', private_key: access_key

node1, node2 = client.random_connections(2)
puts "Checking ping #{node1.node_number} -> #{node2.node_number}"

result = node1.ping_node(node2.node_number)
puts "TCP=#{result.TCP}ms, UDP=#{result.UDP}ms"

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
universa-3.14.5 sample_ping.rb
universa-3.14.4 sample_ping.rb
universa-3.14.3 sample_ping.rb
universa-3.14.2.4 sample_ping.rb
universa-3.14.2.2 sample_ping.rb
universa-3.14.2.1 sample_ping.rb
universa-3.13.2.2 sample_ping.rb
universa-3.13.2.1 sample_ping.rb
universa-3.13.1.1 sample_ping.rb
universa-3.12.6.1 sample_ping.rb
universa-3.12.4.1 sample_ping.rb
universa-3.12.0.2 sample_ping.rb
universa-3.11.4.4 sample_ping.rb
universa-3.11.4.3 sample_ping.rb
universa-3.11.4.2 sample_ping.rb
universa-3.11.4.1 sample_ping.rb
universa-3.11.3.1 sample_ping.rb
universa-3.10.5.3 sample_ping.rb
universa-3.10.5.1 sample_ping.rb
universa-3.10.2.1 sample_ping.rb