lib/pakyow/realtime/websocket.rb in pakyow-realtime-1.0.0.rc3 vs lib/pakyow/realtime/websocket.rb in pakyow-realtime-1.0.0.rc4

- old
+ new

@@ -78,34 +78,36 @@ def beat transmit("beat") end - # @api private - def leave - trigger_presence(:leave) - end - - private - def shutdown if open? @server.socket_disconnect(self) @open = false @logger.info "shutdown" end end + # @api private + def leave + trigger_presence(:leave) + end + + private + def handle_open @server.socket_connect(self) @open = true trigger_presence(:join) @logger.info "opened" transmit_system_info end def handle_message(message) - @logger.internal("< " + message) + @logger.internal { + "< " + message + } end def trigger_presence(event) @connection.app.hooks(:before, event).each do |hook, _| instance_exec(&hook[:block])