UDP stream

Thanks again for your help.
I tried this method already

but i am to unexperienced to handle threathing savely in blender especially its permanent open and not closed and i need to interact with the values that i get from the udp stream in the main threat…and i am pretty sure to destroy everything quikly.
Especially this statement from the blender documentation give me this impression.

Use a Timer to react to events in another thread

You should never modify Blender data at arbitrary points in time in separate threads. However you can use a queue to collect all the actions that should be executed when Blender is in the right state again. Pythons queue.Queue can be used here, because it implements the required locking semantics.

Thats the reason i guess the timer function is right joice for a udp sream.

https://docs.blender.org/api/current/bpy.app.timers.html

Yesterday i tried the timer function without threat and queue and blender only freeze as long as the connection is blocked otherwise it works pretty well (except that i have no idea to get variable from the timer function outside of the function).

Anyway thanks for your help…hope i can count on you if i get more questions…till then i have to experiment a lot more to get this working robust.