ObjFW  Diff

Differences From Artifact [d996f514e3]:

To Artifact [5f9b6a238d]:


97
98
99
100
101
102
103



104

105
106
107
108
109
110

111
112
113

114
115
116
117
118
119
120
97
98
99
100
101
102
103
104
105
106

107
108
109
110
111
112

113
114
115

116
117
118
119
120
121
122
123







+
+
+
-
+





-
+


-
+








	if (_atEndOfStream)
		@throw [OFWriteFailedException exceptionWithObject: self
						   requestedLength: length
							     errNo: ENOTCONN];

#ifndef _WIN32
	if (length > SSIZE_MAX)
		@throw [OFOutOfRangeException exception];

	if (send(_socket, buffer, length, 0) < length)
	if (send(_socket, buffer, length, 0) != (ssize_t)length)
		@throw [OFWriteFailedException
		    exceptionWithObject: self
			requestedLength: length
				  errNo: of_socket_errno()];
#else
	if (length > UINT_MAX)
	if (length > INT_MAX)
		@throw [OFOutOfRangeException exception];

	if (send(_socket, buffer, (unsigned int)length, 0) < length)
	if (send(_socket, buffer, (int)length, 0) != (int)length)
		@throw [OFWriteFailedException
		    exceptionWithObject: self
			requestedLength: length
				  errNo: of_socket_errno()];
#endif
}