@@ -28,11 +28,11 @@ #import "OFRunLoop+Private.h" #import "OFBindFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" -#import "OFNotConnectedException.h" +#import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #import "socket.h" @@ -469,11 +469,11 @@ sender: (of_udp_socket_address_t*)sender { ssize_t ret; if (_socket == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithSocket: self]; + @throw [OFNotOpenException exceptionWithObject: self]; sender->length = (socklen_t)sizeof(sender->address); #ifndef _WIN32 if ((ret = recvfrom(_socket, buffer, length, 0, @@ -524,11 +524,11 @@ - (void)sendBuffer: (const void*)buffer length: (size_t)length receiver: (of_udp_socket_address_t*)receiver { if (_socket == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithSocket: self]; + @throw [OFNotOpenException exceptionWithObject: self]; #ifndef _WIN32 if (sendto(_socket, buffer, length, 0, (struct sockaddr*)&receiver->address, receiver->length) < length) @throw [OFWriteFailedException @@ -584,11 +584,11 @@ } - (void)close { if (_socket == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithSocket: self]; + @throw [OFNotOpenException exceptionWithObject: self]; close(_socket); _socket = INVALID_SOCKET; } @end