Class: Groonga::Client::Protocol::HTTP

Inherits:
Object
  • Object
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,
lib/groonga/client/protocol/http/path-resolvable.rb

Defined Under Namespace

Modules: PathResolvable Classes: Coolio, Synchronous, Thread, UnknownBackendError

Instance Method Summary collapse

Constructor Details

#initialize(url, options) ⇒ HTTP

Returns a new instance of HTTP


35
36
37
38
39
# File 'lib/groonga/client/protocol/http.rb', line 35

def initialize(url, options)
  @url = url
  @options = default_options.merge(options)
  @backend = create_backend
end

Instance Method Details

#close(&block) ⇒ Object


49
50
51
# File 'lib/groonga/client/protocol/http.rb', line 49

def close(&block)
  @backend.close(&block)
end

#connected?Boolean

Returns:

  • (Boolean)

45
46
47
# File 'lib/groonga/client/protocol/http.rb', line 45

def connected?
  @backend.connected?
end

#send(command, &block) ⇒ Object


41
42
43
# File 'lib/groonga/client/protocol/http.rb', line 41

def send(command, &block)
  @backend.send(command, &block)
end