ws2_32: Partial implementation of TransmitFile/TransmitPackets (try 2)
Alexandre Julliard
julliard at winehq.org
Thu Jul 17 04:35:00 CDT 2008
Jon Griffiths <jon_p_griffiths at yahoo.com> writes:
> + while (send_len)
> + {
> + wsabuf.len = send_len;
> + if (wsabuf.len > chunk_len)
> + wsabuf.len = chunk_len;
> + if (!ReadFile(packet->u.s.hFile, wsabuf.buf, wsabuf.len, &n, NULL))
> + goto TransmitPackets_fail;
> + wsabuf.len = n;
> + if (WSASendTo(s, &wsabuf, 1, &n, 0, NULL, 0, NULL, NULL) == SOCKET_ERROR)
> + goto TransmitPackets_fail;
> + send_len -= n;
> + }
This is still wrong, WSASendTo doesn't necessarily send the whole
buffer.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list