@@ -422,11 +422,11 @@ #endif if (bind(_socket, results[0]->address, results[0]->addressLength) != 0) { int errNo = of_socket_errno(); - close(_socket); + closesocket(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port @@ -469,11 +469,11 @@ } if (of_socket_errno() != EADDRINUSE) { int errNo = of_socket_errno(); - close(_socket); + closesocket(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port @@ -494,11 +494,11 @@ addrLen = (socklen_t)sizeof(addr.storage); if (of_getsockname(_socket, (struct sockaddr *)&addr.storage, &addrLen) != 0) { int errNo = of_socket_errno(); - close(_socket); + closesocket(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port socket: self @@ -511,11 +511,11 @@ if (addr.storage.ss_family == AF_INET6) return OF_BSWAP16_IF_LE(addr.in6.sin6_port); # endif #endif - close(_socket); + closesocket(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: EAFNOSUPPORT]; @@ -648,9 +648,9 @@ - (void)close { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; - close(_socket); + closesocket(_socket); _socket = INVALID_SOCKET; } @end