Sha256: a44bbbb5917acfd2fb2c2fe2a44504f5c00588d1c403a32477fd4a8f3b622357

Contents?: true

Size: 475 Bytes

Versions: 4

Compression:

Stored size: 475 Bytes

Contents

module Faye

  class Transport::Local < Transport
    def self.usable?(client, endpoint, &callback)
      callback.call(Server === endpoint)
    end

    def batching?
      false
    end

    def request(envelopes)
      messages = Faye.copy_object(envelopes.map { |e| e.message })
      @endpoint.process(messages, nil) do |responses|
        receive(envelopes, Faye.copy_object(responses))
      end
    end
  end

  Transport.register 'in-process', Transport::Local

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
faye-1.0.4 lib/faye/transport/local.rb
faye-1.0.3 lib/faye/transport/local.rb
faye-1.0.1 lib/faye/transport/local.rb
faye-1.0.0 lib/faye/transport/local.rb