go-osc icon indicating copy to clipboard operation
go-osc copied to clipboard

Answer from server

Open masseelch opened this issue 3 years ago • 3 comments

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?

masseelch avatar Apr 14 '21 08:04 masseelch

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

hypebeast avatar Apr 14 '21 09:04 hypebeast

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.)

masseelch avatar Apr 14 '21 09:04 masseelch

PR #51 adds this missing feature.

gpayer avatar May 02 '21 20:05 gpayer