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

Resolves #8 with WSASend

parent c55d579e
No related branches found
No related tags found
1 merge request!40Implements #89 PNG chunking
Pipeline #11609 passed
......@@ -370,7 +370,12 @@ bool Universe::send(const ftl::UUID &pid, const std::string &name, ARGS... args)
DLOG(WARNING) << "Attempting to call an unknown peer : " << pid.to_string();
return false;
}
#ifdef WIN32
return p->isConnected() && p->send(name, args...) >= 0;
#else
return p->isConnected() && p->send(name, args...) > 0;
#endif
}
/*template <typename... ARGS>
......
......@@ -602,9 +602,7 @@ int Peer::_send() {
}
DWORD bytessent;
LOG(INFO) << "About to send: " << send_size;
int c = WSASend(sock_, wsabuf.data(), send_size, (LPDWORD)&bytessent, 0, NULL, NULL);
LOG(INFO) << "Fin send";
#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