kivy / oscpy

An efficient OSC implementation compatible with python2.7 and 3.5+
MIT License
109 stars 27 forks source link

Awaited send message #71

Open sbahling opened 1 year ago

sbahling commented 1 year ago

Add awaited send_message functions for curio and trio implementations

In order to send a message over an awaited server socket (i.e. when you need external servers to reply to your listening server socket) the sock.sendto call needs to be awaited as well.

This commit adds async/await versions of the send_message and send_bundle functions that are called by the OSCCurioServer and OSCTrioServer send_message and send_bundle methods.

Strictly speaking, the async/await functions would probably not be used directly from the client module, so maybe there is a better place to put them. I tried to find ways to reduce code duplication as much as possible.