Are FETCH and DATA allowed in the same connection?
It feels to me like they should not be, as the whole point of FETCH is for the server to send only buffered data and close the connection quickly while DATA connections stay open in anticipation of new packets arriving. I can think of no use case were FETCH and DATA would be used in a single connection.
Perhaps fetch is really a property of the whole connection, not of the selection of data for a station. So FETCH could be an alternative to END, and DATA was used to say what is wanted? Perhaps even call it ENDFETCH?
So a fetch-style request might go like:
STATION GE_*
SELECT *_H_H_?
DATA 3929540
ENDFETCH
and a keep going data-style request might be:
STATION GE_*
SELECT *_H_H_?
DATA 3929540
END
Then there is no chance of having fetch-style and data-style in the same connection.
Alternatively, maybe FETCH is separate command, like AUTH, that can be given early in the command sequence and means the server should end the connection when all buffered data is sent and keep END as the unique end command.
Are FETCH and DATA allowed in the same connection?
It feels to me like they should not be, as the whole point of FETCH is for the server to send only buffered data and close the connection quickly while DATA connections stay open in anticipation of new packets arriving. I can think of no use case were FETCH and DATA would be used in a single connection.
Perhaps fetch is really a property of the whole connection, not of the selection of data for a station. So FETCH could be an alternative to END, and DATA was used to say what is wanted? Perhaps even call it ENDFETCH?
So a fetch-style request might go like:
and a keep going data-style request might be:
Then there is no chance of having fetch-style and data-style in the same connection.
Alternatively, maybe FETCH is separate command, like AUTH, that can be given early in the command sequence and means the server should end the connection when all buffered data is sent and keep END as the unique end command.
All this is moot if FETCH is removed from the spec, as in https://github.com/FDSN/SeedLink/issues/9#issuecomment-1432369384