Sha256: 0c69017548ed103ab5e663b1d24dd6bf8c98b5108815063a2eab4b37a7acbe34

Contents?: true

Size: 444 Bytes

Versions: 8

Compression:

Stored size: 444 Bytes

Contents

module Faye

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

    def batching?
      false
    end

    def request(messages)
      EventMachine.next_tick do
        @endpoint.process(messages, nil) do |replies|
          receive(Faye.copy_object(replies))
        end
      end
    end
  end

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

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
faye-1.4.0 lib/faye/transport/local.rb
faye-1.3.0 lib/faye/transport/local.rb
faye-1.2.5 lib/faye/transport/local.rb
faye-1.2.4 lib/faye/transport/local.rb
faye-1.2.3 lib/faye/transport/local.rb
faye-1.2.2 lib/faye/transport/local.rb
faye-1.2.1 lib/faye/transport/local.rb
faye-1.2.0 lib/faye/transport/local.rb