Fix issue #20: type cast in send(), add WSAStartup, and add CRTSECURE_NO_WARNINGS for MSVC2013.
This commit is contained in:
+3
-1
@@ -1,6 +1,8 @@
|
||||
#include "easywsclient.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
// CRTSECURE_NO_WARNINGS for sscanf errors in MSVC2013 Express
|
||||
#define CRTSECURE_NO_WARNINGS
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
@@ -203,7 +205,7 @@ class _RealWebSocket : public easywsclient::WebSocket
|
||||
while (txbuf.size()) {
|
||||
int ret;
|
||||
#ifdef _WIN32
|
||||
ret = ::send(sockfd, (int8_t*)&txbuf[0], txbuf.size(), 0);
|
||||
ret = ::send(sockfd, (char*)&txbuf[0], txbuf.size(), 0);
|
||||
#else
|
||||
ret = ::send(sockfd, &txbuf[0], txbuf.size(), 0);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user