Sha256: 95fb4c9ee985d86a811bce2c08da7521c2d5a2df041bcf35b08d0cb77aa45cf4

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

require "pakyow/support/extension"

module Pakyow
  class Application
    module Behavior
      module UI
        module Timeouts
          extend Support::Extension

          apply_extension do
            on :join do
              @connection.app.data.persist(@id)
            end

            on :leave do
              @connection.app.data.expire(@id, config.realtime.timeouts.disconnect)
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pakyow-ui-1.0.6 lib/pakyow/application/behavior/ui/timeouts.rb
pakyow-ui-1.0.5 lib/pakyow/application/behavior/ui/timeouts.rb
pakyow-ui-1.0.4 lib/pakyow/application/behavior/ui/timeouts.rb
pakyow-ui-1.0.3 lib/pakyow/application/behavior/ui/timeouts.rb
pakyow-ui-1.0.2 lib/pakyow/application/behavior/ui/timeouts.rb
pakyow-ui-1.0.1 lib/pakyow/application/behavior/ui/timeouts.rb
pakyow-ui-1.0.0 lib/pakyow/application/behavior/ui/timeouts.rb