summaryrefslogtreecommitdiffstats
path: root/server/red_channel.h
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-11-03 19:01:31 +0200
committerAlon Levy <alevy@redhat.com>2011-01-13 06:56:54 +0200
commit90c93eb3c15c28238999c76dc051c0055e1cb3d8 (patch)
treeffa8b680fcf59459bfd1e77784cb327136e1bea2 /server/red_channel.h
parente7e667f81db7ce7e0a44b1db067c085bc5b40dc7 (diff)
downloadspice-90c93eb3c15c28238999c76dc051c0055e1cb3d8.tar.gz
spice-90c93eb3c15c28238999c76dc051c0055e1cb3d8.tar.xz
spice-90c93eb3c15c28238999c76dc051c0055e1cb3d8.zip
server/red_channel: go marshaller for outgoing (copied from red_worker)
Diffstat (limited to 'server/red_channel.h')
-rw-r--r--server/red_channel.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/red_channel.h b/server/red_channel.h
index 30adfc66..893a7f8a 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -61,7 +61,7 @@ typedef struct IncomingHandler {
} IncomingHandler;
typedef int (*get_outgoing_msg_size_proc)(void *opaque);
-typedef void (*prepare_outgoing_proc)(void *opaque, struct iovec *vec, int *vec_size);
+typedef void (*prepare_outgoing_proc)(void *opaque, struct iovec *vec, int *vec_size, int pos);
typedef void (*on_outgoing_error_proc)(void *opaque);
typedef void (*on_outgoing_block_proc)(void *opaque);
typedef void (*on_outgoing_msg_done_proc)(void *opaque);
@@ -125,18 +125,16 @@ struct RedChannel {
uint32_t pipe_size;
struct {
- SpiceDataHeader header;
+ SpiceMarshaller *marshaller;
+ SpiceDataHeader *header;
union {
SpiceMsgSetAck ack;
SpiceMsgMigrate migrate;
} u;
- uint32_t n_bufs;
- BufDescriptor bufs[MAX_SEND_BUFS];
uint32_t size;
- uint32_t not_sent_buf_head;
-
PipeItem *item;
int blocked;
+ uint64_t serial;
} send_data;
OutgoingHandler outgoing;
@@ -200,6 +198,7 @@ void red_channel_init_send_data(RedChannel *channel, uint16_t msg_type, PipeItem
void red_channel_add_buf(RedChannel *channel, void *data, uint32_t size);
uint64_t red_channel_get_message_serial(RedChannel *channel);
+void red_channel_set_message_serial(RedChannel *channel, uint64_t);
/* when sending a msg. should first call red_channel_begin_send_message */
void red_channel_begin_send_message(RedChannel *channel);