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

Version Path
dnssd-3.0.2 sample/socket.rb
dnssd-3.0.1 sample/socket.rb
dnssd-3.0.0 sample/socket.rb
dnssd-2.0.1 sample/socket.rb
dnssd-2.0 sample/socket.rb
dnssd-1.4 sample/socket.rb
dnssd-1.3.4 sample/socket.rb
dnssd-1.3.3 sample/socket.rb
dnssd-1.3.2 sample/socket.rb
rackjour-0.1.8 vendor/gems/gems/dnssd-1.3.1/sample/socket.rb
dnssd-1.3.1 sample/socket.rb
dnssd-1.3 sample/socket.rb