summaryrefslogtreecommitdiffstats
path: root/server/red_worker.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/red_worker.h')
-rw-r--r--server/red_worker.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/red_worker.h b/server/red_worker.h
index c935e0a7..7732e390 100644
--- a/server/red_worker.h
+++ b/server/red_worker.h
@@ -58,6 +58,26 @@ typedef struct WorkerInitData {
RedDispatcher *red_dispatcher;
} WorkerInitData;
+typedef struct CommonChannelClient {
+ RedChannelClient base;
+ uint32_t id;
+ struct RedWorker *worker;
+ int is_low_bandwidth;
+} CommonChannelClient;
+
+#define CHANNEL_RECEIVE_BUF_SIZE 1024
+typedef struct CommonChannel {
+ RedChannel base; // Must be the first thing
+ struct RedWorker *worker;
+ uint8_t recv_buf[CHANNEL_RECEIVE_BUF_SIZE];
+ uint32_t id_alloc; // bitfield. TODO - use this instead of shift scheme.
+ int during_target_migrate; /* TRUE when the client that is associated with the channel
+ is during migration. Turned off when the vm is started.
+ The flag is used to avoid sending messages that are artifacts
+ of the transition from stopped vm to loaded vm (e.g., recreation
+ of the primary surface) */
+} CommonChannel;
+
RedWorker* red_worker_new(WorkerInitData *init_data);
bool red_worker_run(RedWorker *worker);