Class: OSC::Client
- Inherits:
-
Object
- Object
- OSC::Client
- Defined in:
- lib/osc-ruby/client.rb
Instance Method Summary collapse
-
#initialize(host, port) ⇒ Client
constructor
A new instance of Client.
- #send(mesg) ⇒ Object
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 |