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
This commit is part of merge request !40. Comments created here will be created in the context of that merge request.
...@@ -370,7 +370,12 @@ bool Universe::send(const ftl::UUID &pid, const std::string &name, ARGS... args) ...@@ -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(); DLOG(WARNING) << "Attempting to call an unknown peer : " << pid.to_string();
return false; return false;
} }
#ifdef WIN32
return p->isConnected() && p->send(name, args...) >= 0;
#else
return p->isConnected() && p->send(name, args...) > 0; return p->isConnected() && p->send(name, args...) > 0;
#endif
} }
/*template <typename... ARGS> /*template <typename... ARGS>
......
...@@ -602,9 +602,7 @@ int Peer::_send() { ...@@ -602,9 +602,7 @@ int Peer::_send() {
} }
DWORD bytessent; DWORD bytessent;
LOG(INFO) << "About to send: " << send_size;
int c = WSASend(sock_, wsabuf.data(), send_size, (LPDWORD)&bytessent, 0, NULL, NULL); int c = WSASend(sock_, wsabuf.data(), send_size, (LPDWORD)&bytessent, 0, NULL, NULL);
LOG(INFO) << "Fin send";
#else #else
int c = ftl::net::internal::writev(sock_, send_buf_.vector(), (int)send_buf_.vector_size()); int c = ftl::net::internal::writev(sock_, send_buf_.vector(), (int)send_buf_.vector_size());
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment