In the documentation for the tcp_server, the format for error messages are given as follows:
Given: SET_LEARNING_MODE
Returned error: SET_LEARNING_MODE:KO,"Incorrect number of parameter(s) given."
In the implementation, there are no quotes around the error message. This makes it impossible to detect the end of the response. That also exposes a larger problem with the protocol, which is that it is difficult to resynchronize after reading a partial message, since there are no delimiters between responses. Adding a line break after the response would greatly simplify resynchronization.
The python client assumes incorrectly that reads from a tcp socket will return full messages, and will thus break if a partial read is returned. See https://docs.python.org/3/howto/sockets.html , specifically the last 3 paragraphs of the "Using a Socket" section.
In the documentation for the tcp_server, the format for error messages are given as follows:
SET_LEARNING_MODE
SET_LEARNING_MODE:KO,"Incorrect number of parameter(s) given."
In the implementation, there are no quotes around the error message. This makes it impossible to detect the end of the response. That also exposes a larger problem with the protocol, which is that it is difficult to resynchronize after reading a partial message, since there are no delimiters between responses. Adding a line break after the response would greatly simplify resynchronization.
The python client assumes incorrectly that reads from a tcp socket will return full messages, and will thus break if a partial read is returned. See https://docs.python.org/3/howto/sockets.html , specifically the last 3 paragraphs of the "Using a Socket" section.