module Patch::IO::OSC
Receive OSC
messages and do something with them
Constants
- KEY
Key that will be used by
Patch
to identify the module
Public Instance Methods
new_from_config(config, options = {})
click to toggle source
Instantiate an OSC
server and/or client using the given config @param [Hash] config @param [Hash] options @option options [Action::Container] :actions @option options [Log] :log @return [::Patch::IO::OSC::Server]
# File lib/patch/io/osc.rb, line 26 def new_from_config(config, options = {}) instance_options = { :log => options[:log] } if config[:server].nil? unless config[:client].nil? instance_options[:id] = config[:id] Client.new(config[:client][:host], config[:client][:port], instance_options) end else instance_options[:echo] = config[:client] Server.new(config[:id], config[:server][:port], instance_options) end end