@@ -33,11 +33,11 @@ #import "OFSocket.h" #import "OFSocket+Private.h" #import "OFThread.h" #import "OFAlreadyConnectedException.h" -#import "OFBindSocketFailedException.h" +#import "OFBindIPSocketFailedException.h" @implementation OFUDPSocket @dynamic delegate; - (uint16_t)of_bindToAddress: (OFSocketAddress *)address @@ -50,11 +50,11 @@ #endif if ((_socket = socket( ((struct sockaddr *)&address->sockaddr)->sa_family, SOCK_DGRAM | SOCK_CLOEXEC | extraType, 0)) == OFInvalidSocketHandle) - @throw [OFBindSocketFailedException + @throw [OFBindIPSocketFailedException exceptionWithHost: OFSocketAddressString(address) port: OFSocketAddressPort(address) socket: self errNo: OFSocketErrNo()]; @@ -75,11 +75,11 @@ int errNo = OFSocketErrNo(); closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindSocketFailedException + @throw [OFBindIPSocketFailedException exceptionWithHost: OFSocketAddressString(address) port: OFSocketAddressPort(address) socket: self errNo: errNo]; } @@ -105,11 +105,11 @@ port = OFSocketAddressPort(address); closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindSocketFailedException + @throw [OFBindIPSocketFailedException exceptionWithHost: host port: port socket: self errNo: errNo]; } @@ -131,11 +131,11 @@ int errNo = OFSocketErrNo(); closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindSocketFailedException + @throw [OFBindIPSocketFailedException exceptionWithHost: OFSocketAddressString(address) port: OFSocketAddressPort(address) socket: self errNo: errNo]; } @@ -149,21 +149,21 @@ # endif default: closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindSocketFailedException + @throw [OFBindIPSocketFailedException exceptionWithHost: OFSocketAddressString(address) port: OFSocketAddressPort(address) socket: self errNo: EAFNOSUPPORT]; } #else closesocket(_socket); _socket = OFInvalidSocketHandle; - @throw [OFBindSocketFailedException + @throw [OFBindIPSocketFailedException exceptionWithHost: OFSocketAddressString(address) port: OFSocketAddressPort(address) socket: self errNo: EADDRNOTAVAIL]; #endif