sys-socket: Add socket_newpair utility

Enterprise / Virtualization / SPICE - Frediano Ziglio [] - 7 May 2019 09:14 EDT

Allows to easier port socketpair. Windows does not have this function, we need to create a pair using 2 internet sockets and connecting one to the other. The SPICE core interface implementation provided by Qemu under Windows requires, under Windows, to provide SOCKET handles so pipes or other Windows handles won't work. Windows does not provide a socketpair function so use this replacement.

0c59394b sys-socket: Add socket_newpair utility
server/sys-socket.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++
server/sys-socket.h | 3 +++
2 files changed, 78 insertions(+)


  • Share