@@ -38,11 +38,11 @@ int protocol = 0; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL_H) && defined(FD_CLOEXEC) int flags; #endif - if (_socket != INVALID_SOCKET) + if (_socket != OFInvalidSocketHandle) @throw [OFAlreadyConnectedException exceptionWithSocket: self]; address = OFSocketAddressMakeIPX(zeroNode, 0, port); #ifdef OF_WINDOWS @@ -50,11 +50,11 @@ #else _packetType = address.sockaddr.ipx.sipx_type = packetType; #endif if ((_socket = socket(address.sockaddr.sockaddr.sa_family, - SOCK_DGRAM | SOCK_CLOEXEC, protocol)) == INVALID_SOCKET) + SOCK_DGRAM | SOCK_CLOEXEC, protocol)) == OFInvalidSocketHandle) @throw [OFBindFailedException exceptionWithPort: port packetType: packetType socket: self errNo: OFSocketErrNo()]; @@ -68,11 +68,11 @@ if (bind(_socket, &address.sockaddr.sockaddr, address.length) != 0) { int errNo = OFSocketErrNo(); closesocket(_socket); - _socket = INVALID_SOCKET; + _socket = OFInvalidSocketHandle; @throw [OFBindFailedException exceptionWithPort: port packetType: packetType socket: self errNo: errNo]; @@ -85,21 +85,21 @@ if (OFGetSockName(_socket, &address.sockaddr.sockaddr, &address.length) != 0) { int errNo = OFSocketErrNo(); closesocket(_socket); - _socket = INVALID_SOCKET; + _socket = OFInvalidSocketHandle; @throw [OFBindFailedException exceptionWithPort: port packetType: packetType socket: self errNo: errNo]; } if (address.sockaddr.sockaddr.sa_family != AF_IPX) { closesocket(_socket); - _socket = INVALID_SOCKET; + _socket = OFInvalidSocketHandle; @throw [OFBindFailedException exceptionWithPort: port packetType: packetType socket: self errNo: EAFNOSUPPORT];