server/red_channel (all): add red_channel_get_header
This is useful during the channel specific channel_send_pipe_item_proc callback, it allows altering or reader the header being sent.
This commit is contained in:
parent
17d5761322
commit
e9be6ca82c
@ -719,3 +719,8 @@ int red_channel_get_first_socket(RedChannel *channel)
|
||||
}
|
||||
return channel->stream->socket;
|
||||
}
|
||||
|
||||
SpiceDataHeader *red_channel_get_header(RedChannel *channel)
|
||||
{
|
||||
return channel->send_data.header;
|
||||
}
|
||||
|
||||
@ -275,4 +275,11 @@ void red_channel_send(RedChannel *channel);
|
||||
SpiceMarshaller *red_channel_get_marshaller(RedChannel *channel);
|
||||
RedsStream *red_channel_get_stream(RedChannel *channel);
|
||||
|
||||
/* this is a convenience function for sending messages, sometimes (migration only?)
|
||||
* the serial from the header needs to be available for sending. Note that the header
|
||||
* pointer retrieved is not valid except between red_channel_reset_send_data and
|
||||
* red_channel_begin_send_message. red_channel_init_send_data changes the header (sets
|
||||
* the type in it) as a convenience function. It is preffered to do that through it and
|
||||
* not via the below accessor and direct header manipulation. */
|
||||
SpiceDataHeader *red_channel_get_header(RedChannel *channel);
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user