On Thu, Aug 21, 2008 at 11:03 PM, Victor Ivri <[EMAIL PROTECTED]> wrote:
>
> I'm afraid it doesn't work "out of the box" :( . The server accepts
> it, but the response doesn't get registered with the client; it just
> waits for it indefinitely.

I'm not sure what the response is supposed to be, I don't get/use one
anyway in libtpclient-py.

You should probably regularly poll the server to determine the end of
turn time and base yourself on that. I have the following code:

connection.turnfinished()
waitfor = connection.time()
while waitfor > 1:
    time.sleep(1)
    waitfor = connection.time()
time.sleep(2)

The problem is that the end-of-turn time can be changed while you are
waiting for it, so you have to poll the server to see if your value is
still up to date. My code seems to work pretty fine for the job.

Iwanowitch
_______________________________________________
tp-devel mailing list
[email protected]
http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel

Reply via email to