DiamondLightSource / DiamondLightSource/tickit

CommandAdapter fails to handle multiple requests in one message

Open
#211 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
1
PR merge metrics
No merged PRs in 30d

Description

If requests are sent quickly by a client, a single read by the server can contain multiple requests, e.g. `b'N02=0\r\nN03=0\r\nN04=0\r\n'`

If `CommandAdapter` was updated to take a terminator (`\r\n`) instead of a format string (`%b\r\n`), `TcpIo` could handle multiple requests by splitting the data from the read by the terminator and passing each one separately to the handler, but this will break a lot of things. I couldn't see a sensible way to do it with just the format string because it would have to make too many assumptions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.