summaryrefslogtreecommitdiffstats
path: root/server/red_channel.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/red_channel.h')
-rw-r--r--server/red_channel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/red_channel.h b/server/red_channel.h
index 1f1538ea..201a4d27 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -32,6 +32,7 @@
#include "red_common.h"
#include "demarshallers.h"
#include "reds_stream.h"
+#include "stat.h"
#define MAX_SEND_BUFS 1000
#define CLIENT_ACK_WINDOW 20
@@ -127,6 +128,7 @@ typedef struct OutgoingHandler {
/* Red Channel interface */
+typedef struct RedsStream RedsStream;
typedef struct RedChannel RedChannel;
typedef struct RedChannelClient RedChannelClient;
typedef struct RedClient RedClient;
@@ -335,10 +337,13 @@ struct RedChannel {
// TODO: when different channel_clients are in different threads from Channel -> need to protect!
pthread_t thread_id;
#ifdef RED_STATISTICS
+ StatNodeRef stat;
uint64_t *out_bytes_counter;
#endif
};
+#define RED_CHANNEL(Channel) ((RedChannel *)(Channel))
+
/*
* When an error occurs over a channel, we treat it as a warning
* for spice-server and shutdown the channel.
@@ -370,6 +375,7 @@ RedChannel *red_channel_create_parser(int size,
channel_handle_parsed_proc handle_parsed,
ChannelCbs *channel_cbs,
uint32_t migration_flags);
+void red_channel_set_stat_node(RedChannel *channel, StatNodeRef stat);
void red_channel_register_client_cbs(RedChannel *channel, ClientCbs *client_cbs);
// caps are freed when the channel is destroyed