char-udp: flush as much buffer as possible
commite0b6767b6c56a08827e35873e7d259d08e4b3ee5
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 23 Dec 2016 13:55:54 +0000 (23 14:55 +0100)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 4 May 2017 11:34:41 +0000 (4 15:34 +0400)
treecbce4612aeaafaaada44f6ad48376eccad8cb5bc
parentda2d19b080f6214b646a9f250760f5f41adcd21b
char-udp: flush as much buffer as possible

Instead of flushing the buffer byte by byte, call qemu_chr_be_write()
with as much byte possible accepted by the front-end.

Factor out buffer flushing in a common function udp_chr_flush_buffer().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
chardev/char-udp.c