hideakitai / ArduinoOSC

OSC subscriber / publisher for Arduino
MIT License
207 stars 20 forks source link

multiple clients #40

Closed leutholl closed 1 year ago

leutholl commented 1 year ago

Hi. I want to subscribe on multiple local ports. That's working but how can I send osc out specifying which client instance to be used, so that the srcPort is set of either the client id or on a per-message-level. If the design is meant to be a singleClient architecture, can I set the srcport before sending by calling .localPort(port) before each message?

hideakitai commented 1 year ago

The client will be created per local ports (default is 9). If you use local_port(), a client using its port will be created if it does not exist.

As you mentioned, please call localPort(port) before each message to set the local port per message.

If you still need help, please reopen this issue.

reference: https://github.com/hideakitai/ArduinoOSC/blob/46312dc2ab70bf09b8ff3315063b9668860d2bb7/ArduinoOSC/OscUdpMap.h#L34-L60