You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, how could I implement oscpy with cooroutines using asyncio, I don't understand how to implement the below.
OSCAsyncServer exist in somewere ?
Server (async) (TODO!)
from oscpy.server import OSCThreadServer
with OSCAsyncServer(port=8000) as OSC:
for address, values in OSC.listen():
if address == b'/example':
print("got {} on /example".format(values))
else:
print("unknown address {}".format(address))
The text was updated successfully, but these errors were encountered:
bueltan
changed the title
Async oscpy, help !
Async oscpy, question, help !
Apr 10, 2021
No, this server needs to be done, i didn't find the time to do it, and i didn't had the need for it either.
I assume it shouldn't be very hard to do, at least in a naive form, since there is no backpressure to handle in an udp stream (afaik), but because i didn't do any serious asyncio work yet, I might not build the most sensible api for it.
If you (or anyone) wants to try it, i should be able to help anyway, considering parsing is pretty much split from any network handling, only some parts from the OSCThreadServer might require adaptation for an asyncio usage, maybe creating a parent class containing the common logic, or extracting them in a different module to be used any other contexts if needed.
Hi, how could I implement oscpy with cooroutines using asyncio, I don't understand how to implement the below.
OSCAsyncServer exist in somewere ?
Server (async) (TODO!)
from oscpy.server import OSCThreadServer
with OSCAsyncServer(port=8000) as OSC:
for address, values in OSC.listen():
if address == b'/example':
print("got {} on /example".format(values))
else:
print("unknown address {}".format(address))
The text was updated successfully, but these errors were encountered: