Sockets
Introduction
Example Usage
struct ChatSocket < Maze::WebSockets::ClientSocket
channel "chat_room:*", ChatRoomChannel
def on_connect
# self.session and self.cookies available here
# do authentication here like
# !self.session[:user_id].nil?
# returning true accept all connections
true
end
endSend messages from controllers (or anywhere else)
Last updated