animate armature realtime


I am looking at ways of animating an armature in realtime using data from a network socket.

I managed to set up a script which reads packets from the network socket and translates these to bone rotations. This locked up the Blender interface and the rendering did not seem to keep up. I tried using a thread to listen to the network socket, but this crashed Blender so I am guessing that I am missing something here.

I am not sure if the GE has the ability to do this either as I cannot seem to select individual bones in my armature. I basically want to setup one input to drive all the individual bones of the armature and have them render in realtime.

Can anyone suggest the best way of acheiving this?