Commit Graph

9 Commits

Author SHA1 Message Date
Alon Levy
a32e90257e server/red_worker: multiple client support - base split
This patch compiles but breaks spice.

Split both display and cursor channels to a client part and channel part.

Introduce DisplayChannelClient, CursorChannelClient, CommonChannelClient.
don't disconnect channel on client disconnect.
Move all caches to the ChannelClient's.

Remove reference counting of the channel.

No new functionality introduced.

NOTE: Introduces a crash in disconnections, a regression, resulting from
incorrect thread access, that is fixed in the patch titled:
"server: registering RedChannel in reds, instead of Channel"
2011-08-23 18:01:04 +03:00
Alon Levy
09ae4700d2 server: move pipe from RedChannel to RedChannelClient
Another cleanup patch, no change to behavior (still one client, and it
disconnects previous client if any).

The implementation for multiple client is straightforward: the pipe
remains per (channel,client) pair, so it needs to move from the RedChannel
that to RedChannelClient. Implementation using a single pipe with multiple
consumers (to reflect different latencies) doesn't fit well with pipe rewriting
that is used by the display channel. Additionally this approach is much simpler
to verify. Lastly it doesn't add considerable overhead (but see the display
channel changes in a later patch for a real place to rethink).

This patch is just technical, changing signatures to reflect the first
argument (oop style) so red_channel becomes red_channel_client. Some places
may seem odd but they should be fixed with later comits where the channels
grow to support multiple clients.

Sound (playback/record) channels are the only ones not touched - this is
consistent with previous patches, since they have been left out of the
RedChannel refactoring.  That is left as future work. (note that they don't use
a pipe, which was the reason for not refactoring).
2011-08-23 17:44:54 +03:00
Alon Levy
75b6a305ff server/red_worker: drop red_pipe_add_tail, use red_channel_pipe_add_tail
The only difference between them being that the later also does a push.
I don't believe that to be a problem, but if it does I can always introduce
a push'less version.
2011-08-23 17:01:14 +03:00
Alon Levy
23ba2ce3e5 server/red_worker: use red_channel_pipe_item_init
replaces in file red_pipe_item_init.
2011-03-02 17:27:53 +02:00
Alon Levy
e8698ea0f8 server/red_worker: introduce CommonChannel
with everything (almost) not in red_channel's RedChannel

As a result of CommonChannel a free cb is added to EventHandler,
to take care of non zero offset for embedded EventHandler.
2011-02-11 15:32:20 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
d94cb8e1ba Use spice allocator in server/ 2010-03-11 12:14:08 +01:00
Alexander Larsson
1f51697852 Rename symbols that were changed in spice-protocol
This is an automatic change using:
$ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
$ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
2010-02-04 18:49:00 +01:00
Yaniv Kamay
c1b79eb035 fresh start 2009-10-14 15:06:41 +02:00