Differences From Artifact [f3aa68332f]:
- File
src/OFSequencedPacketSocket.m
— part of check-in
[e5b2ee56ff]
at
2020-04-26 16:21:38
on branch trunk
— Add OFSequencedPacketSocket
This is intended for SCTP and SPX. (user: js, size: 10906) [annotate] [blame] [check-ins using]
To Artifact [02e9d8a16c]:
- File src/OFSequencedPacketSocket.m — part of check-in [13a8f43898] at 2020-04-26 18:10:31 on branch trunk — Move accept and listen OF{TCP -> Stream}Socket (user: js, size: 11123) [annotate] [blame] [check-ins using]
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + | #include <errno.h> #ifdef HAVE_FCNTL_H # include <fcntl.h> #endif #import "OFSequencedPacketSocket.h" #import "OFSequencedPacketSocket+Private.h" #import "OFData.h" #import "OFRunLoop+Private.h" #import "OFRunLoop.h" #import "OFAcceptFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" |
︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | + + + + + + + + + + + + + + | - (void)dealloc { if (_socket != INVALID_SOCKET) [self close]; [super dealloc]; } #ifndef OF_WII - (int)of_socketError { int errNo; socklen_t len = sizeof(errNo); if (getsockopt(_socket, SOL_SOCKET, SO_ERROR, (char *)&errNo, &len) != 0) return of_socket_errno(); return errNo; } #endif - (id)copy { return [self retain]; } - (bool)isBlocking |
︙ | |||
416 417 418 419 420 421 422 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - - - - - | if (_remoteAddress.length > (socklen_t)sizeof(_remoteAddress.sockaddr)) @throw [OFOutOfRangeException exception]; return &_remoteAddress; } |
︙ |