go-osc
go-osc copied to clipboard
Answer from server
I have an remote OSC-Server which cends state information back to a client. I cannot seem to find a way to listen for a reply for a msg sent by a client.
oscC := osc.NewClient("127.0.0.1", 9000)
if err := oscC.Send(osc.NewMessage("/system/server-info")); err != nil {
fmt.Println(err)
}
// How to receive the servers reply?
You need to create your own OSC Server which listens for incoming OSC messages.
You can find an example here: https://github.com/hypebeast/go-osc/blob/master/examples/basic_server/basic_server.go
That is what I did try. However oscC.Send()
seems to open a new port on every message and therefore the response does not reach the port I am listening on with the server. (The server I send the messages to answers and the same port the message came from.)
PR #51 adds this missing feature.