@@ -92,11 +92,11 @@ continue; } break; } - + freeaddrinfo(res0); if (sock < 0) @throw [OFConnectionFailedException newWithObject: self andHost: host @@ -205,11 +205,11 @@ - (size_t)readNBytes: (size_t)size intoBuffer: (uint8_t*)buf { ssize_t ret; - if (sock < 0) + if (sock < 0) @throw [OFNotConnectedException newWithObject: self]; if ((ret = recv(sock, buf, size, 0)) < 0) @throw [OFReadFailedException newWithObject: self andSize: size]; @@ -220,11 +220,11 @@ - (uint8_t*)readNBytes: (size_t)size { uint8_t *ret; - if (sock < 0) + if (sock < 0) @throw [OFNotConnectedException newWithObject: self]; ret = [self getMemWithSize: size]; @try { @@ -241,11 +241,11 @@ - (size_t)writeNBytes: (size_t)size fromBuffer: (const uint8_t*)buf { ssize_t ret; - if (sock < 0) + if (sock < 0) @throw [OFNotConnectedException newWithObject: self]; if ((ret = send(sock, buf, size, 0)) < 0) @throw [OFWriteFailedException newWithObject: self andSize: size]; @@ -254,11 +254,11 @@ return ret; } - (size_t)writeCString: (const char*)str { - if (sock < 0) + if (sock < 0) @throw [OFNotConnectedException newWithObject: self]; return [self writeNBytes: strlen(str) fromBuffer: (const uint8_t*)str]; } @@ -290,11 +290,11 @@ return self; } - close { - if (sock < 0) + if (sock < 0) @throw [OFNotConnectedException newWithObject: self]; sock = -1; if (saddr != NULL)