Differences From Artifact [182b0b3dfd]:
- File
src/OFUDPSocket.m
— part of check-in
[4cecf82254]
at
2015-10-04 11:11:28
on branch trunk
— Special cases for the Wii's weird network stack
This fixes the tests on Wii. (user: js, size: 13205) [annotate] [blame] [check-ins using] [more...]
To Artifact [3c90c2bfad]:
- File src/OFUDPSocket.m — part of check-in [fc73801932] at 2015-10-04 11:30:52 on branch trunk — Better length checks for write / send calls (user: js, size: 13301) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
537 538 539 540 541 542 543 544 | length: (size_t)length receiver: (const of_udp_socket_address_t*)receiver { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; #ifndef _WIN32 if (sendto(_socket, buffer, length, 0, | > > > | > | > | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | length: (size_t)length receiver: (const of_udp_socket_address_t*)receiver { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; #ifndef _WIN32 if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; if (sendto(_socket, buffer, length, 0, (struct sockaddr*)&receiver->address, receiver->length) != (ssize_t)length) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: of_socket_errno()]; #else if (length > INT_MAX) @throw [OFOutOfRangeException exception]; if (sendto(_socket, buffer, (int)length, 0, (struct sockaddr*)&receiver->address, receiver->length) != (int)length) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: of_socket_errno()]; #endif } |
︙ | ︙ |