Skip to content
Snippets Groups Projects
Commit f32ca044 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Attempt 3 at WSASend

parent 22a8a7e9
No related branches found
No related tags found
1 merge request!40Implements #89 PNG chunking
Pipeline #11607 passed
......@@ -596,13 +596,13 @@ int Peer::_send() {
vector<WSABUF> wsabuf(send_size);
for (int i = 0; i < send_size; i++) {
wsabuf[i].len = send_vec[i].iov_len;
wsabuf[i].len = (ULONG)send_vec[i].iov_len;
wsabuf[i].buf = (char*)send_vec[i].iov_base;
//c += ftl::net::internal::send(sock_, (char*)send_vec[i].iov_base, (int)send_vec[i].iov_len, 0);
}
int bytessent;
int c = WSASend(sock_, wsabuf.data(), send_size, &bytessent, 0, NULL, NULL);
DWORD bytessent;
int c = WSASend(sock_, wsabuf.data(), send_size, (LPDWORD)&bytessent, 0, NULL, NULL);
#else
int c = ftl::net::internal::writev(sock_, send_buf_.vector(), (int)send_buf_.vector_size());
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment