Class: Groonga::Client::Protocol::HTTP
- Inherits:
-
Object
- Object
- Groonga::Client::Protocol::HTTP
show all
- Defined in:
- lib/groonga/client/protocol/http.rb,
lib/groonga/client/protocol/http/coolio.rb,
lib/groonga/client/protocol/http/thread.rb,
lib/groonga/client/protocol/http/synchronous.rb
Defined Under Namespace
Classes: Coolio, Synchronous, Thread, UnknownBackendError
Instance Method Summary
collapse
Constructor Details
#initialize(options) ⇒ HTTP
Returns a new instance of HTTP.
35
36
37
38
39
40
|
# File 'lib/groonga/client/protocol/http.rb', line 35
def initialize(options)
@host = options[:host] || "127.0.0.1"
@port = options[:port] || 10041
@options = default_options.merge(options)
@backend = create_backend
end
|
Instance Method Details
#close(&block) ⇒ Object
50
51
52
|
# File 'lib/groonga/client/protocol/http.rb', line 50
def close(&block)
@backend.close(&block)
end
|
#connected? ⇒ Boolean
46
47
48
|
# File 'lib/groonga/client/protocol/http.rb', line 46
def connected?
@backend.connected?
end
|
#send(command, &block) ⇒ Object
42
43
44
|
# File 'lib/groonga/client/protocol/http.rb', line 42
def send(command, &block)
@backend.send(command, &block)
end
|