class Faye::Server::Socket
Public Class Methods
Source
# File lib/faye/protocol/socket.rb, line 5 def initialize(server, socket, env) @server = server @socket = socket @env = env end
Public Instance Methods
Source
# File lib/faye/protocol/socket.rb, line 17 def close @socket.close if @socket @socket = nil end
Source
# File lib/faye/protocol/socket.rb, line 11 def send(message) @server.pipe_through_extensions(:outgoing, message, @env) do |piped_message| @socket.send(Faye.to_json([piped_message])) if @socket end end