Parent

Class/Module Index [+]

Quicksearch

Cucumber::WireSupport::Connection

Public Class Methods

new(config) click to toggle source
# File lib/cucumber/wire_support/connection.rb, line 11
def initialize(config)
  @config = config
end

Public Instance Methods

call_remote(request_handler, message, params) click to toggle source
# File lib/cucumber/wire_support/connection.rb, line 15
def call_remote(request_handler, message, params)
  packet = WirePacket.new(message, params)

  begin
    send_data_to_socket(packet.to_json)
    response = fetch_data_from_socket(@config.timeout(message))
    response.handle_with(request_handler)
  rescue Timeout::Error => e
    backtrace = e.backtrace ; backtrace.shift # because Timeout puts some wierd stuff in there
    raise Timeout::Error, "Timed out calling wire server with message '#{message}'", backtrace
  end
end
exception(params) click to toggle source
# File lib/cucumber/wire_support/connection.rb, line 28
def exception(params)
  WireException.new(params, @config.host, @config.port)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.