Differences From Artifact [d32466923e]:
- File src/OFDatagramSocket.m — part of check-in [4b587c8874] at 2021-04-18 23:18:06 on branch new-naming-convention — INVALID_SOCKET -> OFInvalidSocketHandle (user: js, size: 8893) [annotate] [blame] [check-ins using] [more...]
To Artifact [bbb2f277d7]:
- File
src/OFDatagramSocket.m
— part of check-in
[25adea9a23]
at
2022-08-06 21:14:31
on branch trunk
— Don't use struct sockaddr in OFSocketAddress
struct sockaddr can contain a variable length array, which breaks the
union. (user: js, size: 9029) [annotate] [blame] [check-ins using] [more...]
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ | |||
114 115 116 117 118 119 120 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + | if (fcntl(_socket, F_SETFL, flags) == -1) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: errno]; _canBlock = canBlock; #elif defined(OF_WINDOWS) |
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + - + - + + + + + + | if (_socket == OFInvalidSocketHandle) @throw [OFNotOpenException exceptionWithObject: self]; sender->length = (socklen_t)sizeof(sender->sockaddr); #ifndef OF_WINDOWS if ((ret = recvfrom(_socket, buffer, length, 0, |
︙ | |||
272 273 274 275 276 277 278 | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | - + - - + | #ifndef OF_WINDOWS ssize_t bytesWritten; if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; if ((bytesWritten = sendto(_socket, (void *)buffer, length, 0, |
︙ |