Commit f3f55a29 authored by jan.koester's avatar jan.koester
Browse files

fixed

parent 0bbb6479
Loading
Loading
Loading
Loading
+7 −2
Changes for src/windows/tcp.cpp: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ netplus::tcp::tcp(const std::string &uxsocket,int maxconnections,int sockopts) :

netplus::tcp::tcp(const std::string &addr, int port,int maxconnections,int sockopts) : socket() {
    NetException exception;
    _Type = sockettype::TCP;
    _Maxconnections=maxconnections;

    if (sockopts == -1)
@@ -83,12 +84,16 @@ netplus::tcp::tcp(const std::string &addr, int port,int maxconnections,int socko
            continue;
        break;
    }

    if(_Socket==-1){
        exception[NetException::Critical] << "Create Socket " << (int)_Socket << " failed : " << GetLastError();
        throw exception;
	}

    _SocketInfoLen = sizeof(hints);
    copyAddrInfo(&_SocketInfo, (ULONG_PTR)rp,sizeof(hints));

    ::freeaddrinfo(result);

    _Type=sockettype::TCP;
}

netplus::tcp::~tcp(){
+1 −2
Changes for src/windows/udp.cpp: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ netplus::udp::udp(const std::string &uxsocket, int maxconnections, int sockopts)

netplus::udp::udp(const std::string &addr, int port, int maxconnections, int sockopts) : socket() {
    NetException exception;
    _Type = sockettype::UDP;
    _Maxconnections = maxconnections;

    if (sockopts == -1)
@@ -86,8 +87,6 @@ netplus::udp::udp(const std::string &addr, int port, int maxconnections, int soc
    }

    ::freeaddrinfo(result);

    _Type = sockettype::UDP;
}

netplus::udp::~udp() {
+5 −5

File changed.

Contains only whitespace changes.