@@ -74,10 +74,11 @@ if (eos) { OFReadFailedException *e; e = [OFReadFailedException newWithClass: isa + stream: self requestedSize: size]; #ifndef _WIN32 e->errNo = ENOTCONN; #else e->errNo = WSAENOTCONN; @@ -86,10 +87,11 @@ @throw e; } if ((ret = recv(sock, buf, size, 0)) < 0) @throw [OFReadFailedException newWithClass: isa + stream: self requestedSize: size]; if (ret == 0) eos = YES; @@ -107,10 +109,11 @@ if (eos) { OFWriteFailedException *e; e = [OFWriteFailedException newWithClass: isa + stream: self requestedSize: size]; #ifndef _WIN32 e->errNo = ENOTCONN; #else e->errNo = WSAENOTCONN; @@ -119,10 +122,11 @@ @throw e; } if ((ret = send(sock, buf, size, 0)) == -1) @throw [OFWriteFailedException newWithClass: isa + stream: self requestedSize: size]; /* This is safe, as we already checked for -1 */ return ret; } @@ -132,11 +136,12 @@ { u_long v = enable; isBlocking = enable; if (ioctlsocket(sock, FIONBIO, &v) == SOCKET_ERROR) - @throw [OFSetOptionFailedException newWithClass: isa]; + @throw [OFSetOptionFailedException newWithClass: isa + stream: stream]; } #endif - (int)fileDescriptor {