Gents, thanks for your work on the GTP. I have a [silly] question, IMO not clear in the protocol draft.
Blank lines are specified to be ignored. But what should an engine do with a line containing an Id, and nothing else?
If this counts too as a blank line, then the sender gets no acknowledge for some Id number.
If, on the other hand, a response =Id should be issued, then this is inconsistent with the treatment of blank lines, which get no response.
Thanks, Salvador
On Wed July 25 2007 12:10, Salvador Girbau wrote:
Blank lines are specified to be ignored. But what should an engine do with a line containing an Id, and nothing else?
this is not a valid command line according to the GTP specification and therefore illegal.
In practice, I would answer such a command line with an error response, because it is most likely that the controller intended to send a command, but did not format the command line correctly due to a bug, and is now waiting for a response. If this is the case, then answering with an error response allows to continue the session, as long as the error response to this command is not critcal for the controller. If you ignore the line, the controller will wait forever and the session will hang.
You could also argue that it is better that the engine aborts the session upon receiving ill-formatted command lines to avoid that such errors stay unnoticed. On the other hand, maybe you cannot fix the bug in the controller (if you don't have access to the source code).
- Markus