mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
17 lines
295 B
Ruby
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
|