ObjFW  Diff

Differences From Artifact [fbc78fae5c]:

To Artifact [b406096bcb]:


61
62
63
64
65
66
67
68

69
70
71
72
73
74


75
76
77
78
79
80
81
61
62
63
64
65
66
67

68
69
70
71
72


73
74
75
76
77
78
79
80
81







-
+




-
-
+
+







#endif

+ socket
{
	return [[[self alloc] init] autorelease];
}

- (BOOL)_isAtEndOfStream
- (BOOL)lowlevelIsAtEndOfStream
{
	return atEndOfStream;
}

- (size_t)_readIntoBuffer: (void*)buffer
		   length: (size_t)length
- (size_t)lowlevelReadIntoBuffer: (void*)buffer
			  length: (size_t)length
{
	ssize_t ret;

	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException exceptionWithClass: [self class]
							    socket: self];

101
102
103
104
105
106
107
108
109


110
111
112
113
114
115
116
101
102
103
104
105
106
107


108
109
110
111
112
113
114
115
116







-
-
+
+








	if (ret == 0)
		atEndOfStream = YES;

	return ret;
}

- (void)_writeBuffer: (const void*)buffer
	      length: (size_t)length
- (void)lowlevelWriteBuffer: (const void*)buffer
		     length: (size_t)length
{
	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException exceptionWithClass: [self class]
							    socket: self];

	if (atEndOfStream) {
		OFWriteFailedException *e;