Module: Adman
- Defined in:
- lib/adman.rb,
lib/adman/dnssd.rb,
lib/adman/common.rb
Constant Summary collapse
- DEFAULT_PORT =
3000- TYPE_WEB_SERVER =
"_http._tcp"- DEFAULT_TYPE =
TYPE_WEB_SERVER
Class Attribute Summary collapse
-
.broadcast ⇒ Object
The current broadcast.
-
.broadcaster ⇒ Object
Returns the Broadcaster used by Adman.
Instance Method Summary collapse
Class Attribute Details
.broadcast ⇒ Object
The current broadcast
12 13 14 |
# File 'lib/adman/common.rb', line 12 def broadcast @broadcast end |
.broadcaster ⇒ Object
Returns the Broadcaster used by Adman
5 6 7 |
# File 'lib/adman/common.rb', line 5 def broadcaster @broadcaster end |
Instance Method Details
#advertise(name, options = {}) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/adman.rb', line 13 def advertise(name, ={}) type = .fetch(:type, DEFAULT_TYPE) domain = nil port = .fetch(:port, DEFAULT_PORT) Adman.broadcast = Adman.broadcaster.register(name, type, nil, port) Adman.broadcast end |