I am trying to make a WiFi client-server app in pys60 and I need some help with the threads part in SymbianOS.
main ideea of the app:
the client (runs on the phone) can:
communicate with the PC server +
render 3d objects (so far only basic objects read from a file).
the server can:
store a big 3d scene filled with objects
communicate with the pys60 client and send the objects back to the client
Both features (networking, 3D) work so far, but sepparate.
My problem is with the threads in symbianOS: i want to create a thread that from time to time sends the client position in the scene back to the server. If new objects come into view, the server will send back the new objects and they will get rendered.
So how can I periodicaly send updates to the server without stoping the rendering process?
main loop looks like this:
if __name__ == '__main__':
new3d = lib3d.Render() #get a new render object
appuifw.note(u"Cannot start: %s" % (e))
# create the canvas
appuifw.app.body = new3d.canvas
appuifw.app.exit_key_handler = new3d.set_exit
new3d.initgl() #opengl es init
createMenuItems() #create the menu
new3d.run(objects) #draw a scene with the objects provided
#HERE in paralel, from time to time i would like to update my position to the server. basicaly send new3d.position to the server