ObjFW  Diff

Differences From Artifact [272212f745]:

To Artifact [c5ebdea8f5]:


83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

	if (ret == 0)
		_atEndOfStream = true;

	return ret;
}

- (void)lowlevelWriteBuffer: (const void *)buffer
		     length: (size_t)length
{
	if (_socket == INVALID_SOCKET)
		@throw [OFNotOpenException exceptionWithObject: self];

#ifndef OF_WINDOWS
	ssize_t bytesWritten;








|
|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

	if (ret == 0)
		_atEndOfStream = true;

	return ret;
}

- (size_t)lowlevelWriteBuffer: (const void *)buffer
		       length: (size_t)length
{
	if (_socket == INVALID_SOCKET)
		@throw [OFNotOpenException exceptionWithObject: self];

#ifndef OF_WINDOWS
	ssize_t bytesWritten;

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
		@throw [OFWriteFailedException
		    exceptionWithObject: self
			requestedLength: length
			   bytesWritten: 0
				  errNo: of_socket_errno()];
#endif

	if ((size_t)bytesWritten != length)
		@throw [OFWriteFailedException exceptionWithObject: self
						   requestedLength: length
						      bytesWritten: bytesWritten
							     errNo: 0];
}

#ifdef OF_WINDOWS
- (void)setBlocking: (bool)enable
{
	u_long v = enable;
	_blocking = enable;







|
<
<
<
<







115
116
117
118
119
120
121
122




123
124
125
126
127
128
129
		@throw [OFWriteFailedException
		    exceptionWithObject: self
			requestedLength: length
			   bytesWritten: 0
				  errNo: of_socket_errno()];
#endif

	return (size_t)bytesWritten;




}

#ifdef OF_WINDOWS
- (void)setBlocking: (bool)enable
{
	u_long v = enable;
	_blocking = enable;