Sha256: 45c7aaf85c3c1e72e65cbdc68d197933ea67b006c8b78e4baf2c0ff47f261d06

Contents?: true

Size: 467 Bytes

Versions: 16

Compression:

Stored size: 467 Bytes

Contents

module Faye
  class Server

    class Socket
      def initialize(server, socket, env)
        @server = server
        @socket = socket
        @env    = env
      end

      def send(message)
        @server.pipe_through_extensions(:outgoing, message, @env) do |piped_message|
          @socket.send(Faye.to_json([piped_message])) if @socket
        end
      end

      def close
        @socket.close if @socket
        @socket = nil
      end
    end

  end
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
faye-1.4.0 lib/faye/protocol/socket.rb
faye-1.3.0 lib/faye/protocol/socket.rb
faye-1.2.5 lib/faye/protocol/socket.rb
faye-1.1.3 lib/faye/protocol/socket.rb
faye-1.2.4 lib/faye/protocol/socket.rb
faye-1.2.3 lib/faye/protocol/socket.rb
faye-1.2.2 lib/faye/protocol/socket.rb
faye-1.2.1 lib/faye/protocol/socket.rb
faye-1.2.0 lib/faye/protocol/socket.rb
faye-ouvrages-1.1.2.1 lib/faye/protocol/socket.rb
faye-ouvrages-1.1.2 lib/faye/protocol/socket.rb
faye-1.1.2 lib/faye/protocol/socket.rb
faye-1.1.1 lib/faye/protocol/socket.rb
faye-1.1.0 lib/faye/protocol/socket.rb
faye-huboard-1.0.5 lib/faye/protocol/socket.rb
faye-huboard-1.0.4 lib/faye/protocol/socket.rb