Commit 82b57b33 authored by jan.koester's avatar jan.koester
Browse files

ups

parent 8c9799e8
Loading
Loading
Loading
Loading
+2 −2
Changes for src/windows/tcp.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ netplus::tcp::tcp(const std::string &addr, int port,int maxconnections,int socko
    if (sockopts == -1)
        sockopts = SO_REUSEADDR|WSA_FLAG_OVERLAPPED;

    struct addrinfo hints,*result,*rp;
    struct addrinfo hints, * result = nullptr, * rp = nullptr;

    memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_UNSPEC;
@@ -324,7 +324,7 @@ void netplus::tcp::connect(std::shared_ptr<socket> &csock){
        exception[NetException::Error] << "Connect: getpeername failed on " << (int)_Socket << " error code : " << GetLastError();
        throw exception;
    }

	_Type = sockettype::TCP;
    _Wait = true;
}

+2 −3
Changes for src/windows/udp.cpp: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ netplus::udp::udp(const std::string &addr, int port, int maxconnections, int soc
    if (sockopts == -1)
        sockopts = SO_REUSEADDR | WSA_FLAG_OVERLAPPED;

    struct addrinfo hints, * result, * rp;
    struct addrinfo hints, * result = nullptr, * rp = nullptr;

    memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_UNSPEC;
@@ -231,8 +231,6 @@ size_t netplus::udp::sendData(buffer &data, int flags) {

            // Handle other synchronous errors.
        case WSAENETDOWN:
        case WSAENETRESET:
        case WSAENOTCONN:
        case WSAESHUTDOWN:
        case WSAECONNABORTED:
        case WSAECONNRESET:
@@ -325,6 +323,7 @@ void netplus::udp::connect(std::shared_ptr<socket> &csock) {
        throw exception;
    }

	_Type = sockettype::UDP;
    _Wait = true;
}