Class: OSC::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/osc-ruby/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(host, port) ⇒ Client

Returns a new instance of Client.



4
5
6
7
# File 'lib/osc-ruby/client.rb', line 4

def initialize(host, port)
  @so = UDPSocket.new
  @so.connect(host, port)
end

Instance Method Details

#send(mesg) ⇒ Object



9
10
11
# File 'lib/osc-ruby/client.rb', line 9

def send(mesg)
  @so.send(mesg.encode, 0)
end