Sha256: a79f31d1669be6cb47a3a3506b755e177c21ee3de49fcea9c8497ed4936bd2c7
Contents?: true
Size: 659 Bytes
Versions: 16
Compression:
Stored size: 659 Bytes
Contents
module Startback module Websocket module Hub # # The Hub is a very opinionated websocket protocol based on room and # subscriptions, allowing users to subscribe to rooms etc etc... # TODO # class App < Websocket::App def initialize(context, rooms, handler) super(context) @handler = handler @rooms = rooms end def room(name) @rooms[name] end def on_message(event, ws, env) @handler.call(Message.new(event.data, ws), ws, env) end end # class App end # module Hub end # module Websocket end # module Startback
Version data entries
16 entries across 16 versions & 1 rubygems