Loading src/windows/udp.cpp +7 −7 Changes for src/windows/udp.cpp: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -41,13 +41,13 @@ extern "C" { #include "exception.h" #include "socket.h" netplus::udp::udp(const char* uxsocket, int maxconnections, int sockopts) : socket() { netplus::udp::udp(const std::string &uxsocket, int maxconnections, int sockopts) : socket() { NetException exception; exception[NetException::Critical] << "udp: Windows doesn't support UnixSockets !"; throw exception; } netplus::udp::udp(const char* addr, int port, int maxconnections, int sockopts) : socket() { netplus::udp::udp(const std::string &addr, int port, int maxconnections, int sockopts) : socket() { NetException exception; _Maxconnections = maxconnections; Loading @@ -67,7 +67,7 @@ netplus::udp::udp(const char* addr, int port, int maxconnections, int sockopts) char serv[512]; snprintf(serv, 512, "%d", port); if ((tsock = ::getaddrinfo(addr, serv, &hints, &result)) < 0) { if ((tsock = ::getaddrinfo(addr.c_str(), serv, &hints, &result)) < 0) { exception[NetException::Critical] << "Socket Invalid address/ Address not supported"; throw exception; } Loading Loading @@ -188,12 +188,12 @@ void netplus::udp::bind() { } } size_t netplus::udp::sendData(void* data, unsigned long size, int flags) { size_t netplus::udp::sendData(std::shared_ptr<char> &data,size_t size, int flags) { NetException exception; WSABUF buf; buf.buf = (char*)data; buf.buf = (char*)data.get(); buf.len = size; DWORD dwBytes = 0; Loading @@ -213,13 +213,13 @@ size_t netplus::udp::sendData(void* data, unsigned long size, int flags) { return (size_t)rval; } size_t netplus::udp::recvData(void* data, unsigned long size, int flags) { size_t netplus::udp::recvData(std::shared_ptr<char> data, size_t size, int flags) { NetException exception; WSABUF buf; buf.buf = (char*)data; buf.buf = (char*)data.get(); buf.len = size; DWORD dwBytes = 0; Loading Loading
src/windows/udp.cpp +7 −7 Changes for src/windows/udp.cpp: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -41,13 +41,13 @@ extern "C" { #include "exception.h" #include "socket.h" netplus::udp::udp(const char* uxsocket, int maxconnections, int sockopts) : socket() { netplus::udp::udp(const std::string &uxsocket, int maxconnections, int sockopts) : socket() { NetException exception; exception[NetException::Critical] << "udp: Windows doesn't support UnixSockets !"; throw exception; } netplus::udp::udp(const char* addr, int port, int maxconnections, int sockopts) : socket() { netplus::udp::udp(const std::string &addr, int port, int maxconnections, int sockopts) : socket() { NetException exception; _Maxconnections = maxconnections; Loading @@ -67,7 +67,7 @@ netplus::udp::udp(const char* addr, int port, int maxconnections, int sockopts) char serv[512]; snprintf(serv, 512, "%d", port); if ((tsock = ::getaddrinfo(addr, serv, &hints, &result)) < 0) { if ((tsock = ::getaddrinfo(addr.c_str(), serv, &hints, &result)) < 0) { exception[NetException::Critical] << "Socket Invalid address/ Address not supported"; throw exception; } Loading Loading @@ -188,12 +188,12 @@ void netplus::udp::bind() { } } size_t netplus::udp::sendData(void* data, unsigned long size, int flags) { size_t netplus::udp::sendData(std::shared_ptr<char> &data,size_t size, int flags) { NetException exception; WSABUF buf; buf.buf = (char*)data; buf.buf = (char*)data.get(); buf.len = size; DWORD dwBytes = 0; Loading @@ -213,13 +213,13 @@ size_t netplus::udp::sendData(void* data, unsigned long size, int flags) { return (size_t)rval; } size_t netplus::udp::recvData(void* data, unsigned long size, int flags) { size_t netplus::udp::recvData(std::shared_ptr<char> data, size_t size, int flags) { NetException exception; WSABUF buf; buf.buf = (char*)data; buf.buf = (char*)data.get(); buf.len = size; DWORD dwBytes = 0; Loading