spice/server/main_dispatcher.h
Alon Levy bd8771adbc [0.8 branch] server: add main_dispatcher
add main_dispatcher, a message passing mechanism for sending messages to
the main thread. The main thread is the thread that implements
SpiceCoreInterface, which is assumed to be a single thread.

Similar to the async operation of red_worker, a socket pair is created
and used to pass messages. The messages are a fixed size to ease
parsing. A single message is defined to pass a channel_event.

RHBZ: 746950
FDBZ: 41858

This patch is 0.8 branch only, for the master branch there should be a
better approach to share code with red_dispatcher and ready the way for
later adding more threads.

cherry-pick from 0.8 80caf07e09

Conflicts:

	server/reds.c
2011-10-31 17:35:54 +02:00

10 lines
230 B
C

#ifndef MAIN_DISPATCHER_H
#define MAIN_DISPATCHER_H
#include <spice.h>
void main_dispatcher_channel_event(int event, SpiceChannelEventInfo *info);
void main_dispatcher_init(SpiceCoreInterface *core);
#endif //MAIN_DISPATCHER_H