You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify read operations in the underlaying connection
About point 1:
Note that each client corresponds to a connection, but there may be multiple publishers or subscribers sharing this client with multiple PublishConfirm or Deliver callbacks registered into. When scheduling frame callbacks in _listener task, rstream needs a for loop, but only one callback actually process this frame, so the for loop is unnecessary. To solve this, Client needs to maintain extra info about stream topo.
About point 2:
Connection is based on Asyncio Stream API. Currently, Connection holds a buffer, and StreamReader also holds a buffer, in this way, data is copied twice in Connection._read. Maybe rewrite like this:
BaseClient._handlers
a plain dictAbout point 1:
Note that each client corresponds to a connection, but there may be multiple publishers or subscribers sharing this client with multiple
PublishConfirm
orDeliver
callbacks registered into. When scheduling frame callbacks in_listener
task, rstream needs a for loop, but only one callback actually process this frame, so the for loop is unnecessary. To solve this,Client
needs to maintain extra info about stream topo.About point 2:
Connection is based on Asyncio Stream API. Currently, Connection holds a buffer, and StreamReader also holds a buffer, in this way, data is copied twice in
Connection._read
. Maybe rewrite like this:The text was updated successfully, but these errors were encountered: