class OSC::Client
Public Class Methods
new(port, host = "127.0.0.1")
click to toggle source
# File lib/ruby-osc/client.rb, line 7 def initialize(port, host = "127.0.0.1") @socket = UDPSocket.new @socket = UDPSocket.open @socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_BROADCAST, true) @socket.connect host, port end
Public Instance Methods
send(mesg, *_args)
click to toggle source
# File lib/ruby-osc/client.rb, line 14 def send(mesg, *_args) @socket.send mesg.encode, 0 end