Python server while the GE is running?

Hello, I’ve been playing a bit with trying to get sockets to work in blender, and it seems to work just as expected. But I’ve run into a problem. I want my python script to run as a server, always listening for incoming connections. So I have a ‘while 1’ loop that exists till the user decides to turn off the server. But the Game Engine seems to only want to start the game once my script is done running. So I can’t run both the server and the game engine at the same time. Is there a way around this?

Hi Jimux,

have a look at this thread:

http://blenderartists.org/forum/showthread.php?t=121029

if this isn’t helping, send a message or pm me …
greetz

raw

Thanks. I found the best way to handle it was to run the server in a separate thread. That way the GE doesn’t have to wait up for anything.