Sha256: 86b6fa3ba558eae17033dbf7469cc6e888a483392f78500cd4260a907a125b8c
Contents?: true
Size: 408 Bytes
Versions: 12
Compression:
Stored size: 408 Bytes
Contents
require 'dnssd' Thread.abort_on_exception = true trap 'INT' do exit end trap 'TERM' do exit end puts 'run sample/server.rb' service = nil DNSSD.browse! '_blackjack._tcp', 'local.' do |reply| service = reply break end puts "found service #{service.name}" socket = service.connect puts "Connected to %s:%d" % socket.peeraddr.values_at(2, 1) puts " from %s:%d" % socket.addr.values_at(2, 1)
Version data entries
12 entries across 12 versions & 2 rubygems