Commit 09c53f34 authored by jan.koester's avatar jan.koester
Browse files

fixes

parent bd2d3ac1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ netplus::udp::udp() : socket() {
netplus::udp::udp(SOCKET sock) : socket() {
    ((struct addrinfo*)_SocketInfo)->ai_family = AF_UNSPEC;
    _Socket = sock;
    _Type = sockettype::TCP;
    _Type = sockettype::UDP;
}

void netplus::udp::listen() {
@@ -219,7 +219,7 @@ void netplus::udp::connect(socket* ssock) {

    copyAddrInfo(&_SocketInfo,ssock->_SocketInfo);

    if ((_Socket = ::socket(((struct addrinfo*)_SocketInfo)->ai_family, SOCK_STREAM, 0)) < 0) {
    if ((_Socket = ::socket(((struct addrinfo*)_SocketInfo)->ai_family, SOCK_DGRAM, 0)) < 0) {
        NetException exception;
        exception[NetException::Error] << "Create Socket " << (int)_Socket << " failed : " << GetLastError();
        throw exception;