aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/worker.rb
blob: 46b5f7edc0ea2e12a9ea916b25ebe978174b3f33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module ActionCable
  class Worker
    include ActiveSupport::Callbacks
    include Celluloid

    define_callbacks :work

    def received_data(connection, data)
      run_callbacks :work do
        connection.received_data(data)
      end
    end

    def cleanup_subscriptions(connection)
      connection.cleanup_subscriptions
    end

  end
end