@@ -22,11 +22,11 @@ #include #import "OFStreamSocket.h" #import "OFInitializationFailedException.h" -#import "OFNotConnectedException.h" +#import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFSetOptionFailedException.h" #import "OFWriteFailedException.h" @@ -57,11 +57,11 @@ length: (size_t)length { ssize_t ret; if (_socket == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithSocket: self]; + @throw [OFNotOpenException exceptionWithObject: self]; if (_atEndOfStream) @throw [OFReadFailedException exceptionWithObject: self requestedLength: length errNo: ENOTCONN]; @@ -91,11 +91,11 @@ - (void)lowlevelWriteBuffer: (const void*)buffer length: (size_t)length { if (_socket == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithSocket: self]; + @throw [OFNotOpenException exceptionWithObject: self]; if (_atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: ENOTCONN]; @@ -162,11 +162,11 @@ } - (void)close { if (_socket == INVALID_SOCKET) - @throw [OFNotConnectedException exceptionWithSocket: self]; + @throw [OFNotOpenException exceptionWithObject: self]; close(_socket); _socket = INVALID_SOCKET; _atEndOfStream = false;