[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] question about GTP

From: Dave Denholm
Subject: Re: [gnugo-devel] question about GTP
Date: Wed, 26 Nov 2003 15:48:15 +0000
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (usg-unix-v)

Trung Hoang <address@hidden> writes:

> Hi.
> I am trying to use GTP to communicate with gnugo.
> I succeded to send one message to it, but my second
> or messages after the first do not get through.
> I have used the example file vanilla.c and started to build from there.
> What I try to do is to send predefined commands through GTP.
> example:
> char command1[] = "showboard\n";
> char command2[] = "play black d1\n";
> ...
> and send it like:
> TELL_GNUGO(command1);
> ASK_GNUGO(buffer);

what's inside TELL_GNUGO() / ASK_GNUGO() ?

If you are using stdio, are you aware of buffering issues ?

if you are using unix, truss [solaris] / strace [linux] is a useful way of 
these sorts of things.

If your program is spawning gnugo, then

 truss -f your_program

will report system calls in your program and all sub-processes. You
should be able to tell whether your command is being delivered to
gnugo, and whether it is sending a reply which you are not receiving.

Otherwise you can use  truss -p <pid1> <pid2> to attach to running

Dave Denholm              <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]