@@ -221,18 +221,18 @@ return newsock; } - (size_t)readNBytes: (size_t)size - intoBuffer: (uint8_t*)buf + intoBuffer: (char*)buf { ssize_t ret; if (sock == INVALID_SOCKET) @throw [OFNotConnectedException newWithClass: [self class]]; - switch ((ret = recv(sock, (char*)buf, size, 0))) { + switch ((ret = recv(sock, buf, size, 0))) { case 0: @throw [OFNotConnectedException newWithClass: [self class]]; case -1: @throw [OFReadFailedException newWithClass: [self class] andSize: size]; @@ -241,18 +241,18 @@ /* This is safe, as we already checked < 1 */ return ret; } - (size_t)writeNBytes: (size_t)size - fromBuffer: (const uint8_t*)buf + fromBuffer: (const char*)buf { ssize_t ret; if (sock == INVALID_SOCKET) @throw [OFNotConnectedException newWithClass: [self class]]; - if ((ret = send(sock, (char*)buf, size, 0)) == -1) + if ((ret = send(sock, buf, size, 0)) == -1) @throw [OFWriteFailedException newWithClass: [self class] andSize: size]; /* This is safe, as we already checked for -1 */ return ret; @@ -262,11 +262,11 @@ { if (sock == INVALID_SOCKET) @throw [OFNotConnectedException newWithClass: [self class]]; return [self writeNBytes: strlen(str) - fromBuffer: (const uint8_t*)str]; + fromBuffer: str]; } - setBlocking: (BOOL)enable { #ifndef _WIN32