1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/lib/mpd_client/connection.rb
2013-12-12 11:51:59 +00:00

17 lines
295 B
Ruby

module MPDClient
class Connection < MPD
attr_accessor :connected_users
def initialize(host, port, opts = {})
@connected_users = Set.new
super host, port, opts.merge(callbacks: true)
end
def each_conn(&block)
connected_users.each(&block)
end
end
end