diff options
author | Alon Levy <alevy@redhat.com> | 2010-11-08 15:06:10 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-02-07 19:22:44 +0200 |
commit | e9103c67addba3d3ac9cc2d2a45341a4489e0c71 (patch) | |
tree | b10bdaf236a531de6a9dd758c4ca45fecd9c6377 /server | |
parent | e655c5d26e7ce7de32586d4d2be48c101e3aa4f3 (diff) | |
download | spice-e9103c67addba3d3ac9cc2d2a45341a4489e0c71.tar.gz spice-e9103c67addba3d3ac9cc2d2a45341a4489e0c71.tar.xz spice-e9103c67addba3d3ac9cc2d2a45341a4489e0c71.zip |
server/red_channel: add TODO
Diffstat (limited to 'server')
-rw-r--r-- | server/red_channel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c index 2a7a5ff0..205eaf9f 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -64,6 +64,10 @@ static int red_peer_receive(RedsStreamContext *peer, uint8_t *buf, uint32_t size return pos - buf; } +// TODO: this implementation, as opposed to the old implementation in red_worker, +// does many calls to red_peer_receive and through it cb_read, and thus avoids pointer +// arithmetic for the case where a single cb_read could return multiple messages. But +// this is suboptimal potentially. Profile and consider fixing. static void red_peer_handle_incoming(RedsStreamContext *peer, IncomingHandler *handler) { int bytes_read; |