mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
io: get rid of bounce buffering in websock write path
Currently most outbound I/O on the websock channel gets copied into the rawoutput buffer, and then immediately copied again into the encoutput buffer, with a header prepended. Now that qio_channel_websock_encode accepts a struct iovec, we can trivially remove this bounce buffering and write directly to encoutput. In doing so, we also now correctly validate the encoutput size against the QIO_CHANNEL_WEBSOCK_MAX_BUFFER limit. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
fb74e59039
commit
8dfd5f9651
2 changed files with 28 additions and 37 deletions
|
@ -59,7 +59,6 @@ struct QIOChannelWebsock {
|
|||
Buffer encinput;
|
||||
Buffer encoutput;
|
||||
Buffer rawinput;
|
||||
Buffer rawoutput;
|
||||
size_t payload_remain;
|
||||
size_t pong_remain;
|
||||
QIOChannelWebsockMask mask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue