@@ -24,11 +24,11 @@ #import "OFIPXSocket.h" #import "OFSocket.h" #import "OFSocket+Private.h" #import "OFAlreadyConnectedException.h" -#import "OFBindFailedException.h" +#import "OFBindSocketFailedException.h" @implementation OFIPXSocket @dynamic delegate; - (OFSocketAddress)bindToPort: (uint16_t)port packetType: (uint8_t)packetType @@ -51,11 +51,11 @@ _packetType = address.sockaddr.ipx.sipx_type = packetType; #endif if ((_socket = socket(address.sockaddr.ipx.sipx_family, SOCK_DGRAM | SOCK_CLOEXEC, protocol)) == OFInvalidSocketHandle) - @throw [OFBindFailedException + @throw [OFBindSocketFailedException exceptionWithPort: port packetType: packetType socket: self errNo: OFSocketErrNo()]; @@ -71,14 +71,15 @@ int errNo = OFSocketErrNo(); closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindFailedException exceptionWithPort: port - packetType: packetType - socket: self - errNo: errNo]; + @throw [OFBindSocketFailedException + exceptionWithPort: port + packetType: packetType + socket: self + errNo: errNo]; } memset(&address, 0, sizeof(address)); address.family = OFSocketAddressFamilyIPX; address.length = (socklen_t)sizeof(address.sockaddr); @@ -88,24 +89,26 @@ int errNo = OFSocketErrNo(); closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindFailedException exceptionWithPort: port - packetType: packetType - socket: self - errNo: errNo]; + @throw [OFBindSocketFailedException + exceptionWithPort: port + packetType: packetType + socket: self + errNo: errNo]; } if (address.sockaddr.ipx.sipx_family != AF_IPX) { closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindFailedException exceptionWithPort: port - packetType: packetType - socket: self - errNo: EAFNOSUPPORT]; + @throw [OFBindSocketFailedException + exceptionWithPort: port + packetType: packetType + socket: self + errNo: EAFNOSUPPORT]; } return address; }