Open niceguy135 opened 8 months ago
Hello,
IMHO this is a feature, not a bug. The socket is of the SOCK_STREAM; type which means that data are being sent and received as a stream of bytes. Thus, sending **N** bytes in one
sendcall does not imply their reception in one
recv` call. It depends on how quickly the data are transferred between the host and the VM.
You would need a datagram (message-based) socket, however, I do not think such sockets are supported by the Socket driver at the moment.
Describe the bug A test script is running on the host, sending bytes of data over vsock. Another application that has developed with a wrapper for working with vsock receives this data on Windows guest.
The problem is that vsok on the WIndows side reads randomly more or less data than was sent from the Linux side.
TraceView logs: LogSession0.txt
To Reproduce On Linux host run this: vsock_test.txt
On Windows guest run this: client_test.txt With this imported vsock wrapper: winSock.txt
Expected behavior Well, I kind of expect WIndows to receive exactly as many bytes over vsock as it is sent)
Screenshots
From Linux host:
From Windows guest:
Host:
qemu-system-x86_64
will be good)VM:
Additional context The problem disappears (for the current test) if you increase the buffer. But this approach to solving the problem does not seem right to me