Class: Adhoc::Service::HTTP

Inherits:
Adhoc::Service show all
Defined in:
lib/adhoc/service.rb

Overview

Hypertext Transfer Protocol (HTTP)

Constant Summary

DNSSD_TYPE =
"_http._tcp."

Instance Method Summary

Methods inherited from Adhoc::Service

each, for, #initialize, #name, to_sym, #to_uri, #to_url, type

Constructor Details

This class inherits a constructor from Adhoc::Service

Instance Method Details

- (Object) to_s



97
98
99
100
101
# File 'lib/adhoc/service.rb', line 97

def to_s
  url = "http://#{reply.target}"
  url << ":#{reply.port}" unless reply.port == 80
  url << (reply.text_record["path"] || "/")
end