Overview
Comment: | OFTCPSocket: Add -[setTCPNoDelayEnabled:]
This also adds -[isTCPNoDelayEnabled] and -[isKeepAliveEnabled], |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
12fbe85aab3d4668266361e137b9ca2f |
User & Date: | js on 2015-05-03 10:16:23 |
Other Links: | manifest | tags |
Context
2015-05-03
| ||
11:34 | Check <= SSIZE_MAX before assignign to ssize_t check-in: daf78156a7 user: js tags: trunk | |
10:16 | OFTCPSocket: Add -[setTCPNoDelayEnabled:] check-in: 12fbe85aab user: js tags: trunk | |
09:39 | Improve OFKernelEventObserverTests check-in: 3791ec8e42 user: js tags: trunk | |
Changes
Modified ObjFW.xcodeproj/project.pbxproj from [e2719fbf29] to [67db6bcb26].
︙ | |||
246 247 248 249 250 251 252 253 254 255 256 257 258 259 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | + + | 4B3D23E71337FCB000DD29B8 /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3D236D1337FB5800DD29B8 /* base64.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23E81337FCB000DD29B8 /* macros.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BBA36C511406AB700CBA3AC /* macros.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23E91337FCB000DD29B8 /* of_asprintf.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB50DCF12F863C700C9393F /* of_asprintf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23EA1337FCB000DD29B8 /* threading.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B67998B1099E7C50041064A /* threading.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23EB1337FCB000DD29B8 /* unicode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B67998C1099E7C50041064A /* unicode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3D23EE1337FFD000DD29B8 /* of_asprintf.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB50DD012F863C700C9393F /* of_asprintf.m */; }; 4B3D5694139A617D0010A78F /* OFSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B3D5693139A617D0010A78F /* OFSerializationTests.m */; }; 4B3ED7C21AF62C30004C8FF1 /* OFGetOptionFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3ED7C01AF62C30004C8FF1 /* OFGetOptionFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B3ED7C31AF62C30004C8FF1 /* OFGetOptionFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B3ED7C11AF62C30004C8FF1 /* OFGetOptionFailedException.m */; }; 4B40EC1B189FE2650031E19E /* socket.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B40EC1A189FE2650031E19E /* socket.m */; }; 4B45355313DCFE1E0037AB4D /* OFCountedSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B45355113DCFE1E0037AB4D /* OFCountedSet.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B45355413DCFE1E0037AB4D /* OFCountedSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45355213DCFE1E0037AB4D /* OFCountedSet.m */; }; 4B48B95414DC23B100546D39 /* OFXMLProcessingInstructions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B48B95214DC23B100546D39 /* OFXMLProcessingInstructions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B48B95514DC23B100546D39 /* OFXMLProcessingInstructions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B48B95314DC23B100546D39 /* OFXMLProcessingInstructions.m */; }; 4B49EA66143B39CE0005BBC6 /* OFXMLNodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B49EA65143B39CE0005BBC6 /* OFXMLNodeTests.m */; }; 4B49EA6D143B3A090005BBC6 /* OFXMLCDATA.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B49EA67143B3A090005BBC6 /* OFXMLCDATA.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
︙ | |||
673 674 675 676 677 678 679 680 681 682 683 684 685 686 | 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | + + | 4B3B0796166978780044E634 /* OFMapTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFMapTable.h; path = src/OFMapTable.h; sourceTree = "<group>"; }; 4B3B0797166978780044E634 /* OFMapTable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFMapTable.m; path = src/OFMapTable.m; sourceTree = "<group>"; }; 4B3D236D1337FB5800DD29B8 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = base64.h; path = src/base64.h; sourceTree = "<group>"; }; 4B3D236E1337FB5800DD29B8 /* base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = base64.m; path = src/base64.m; sourceTree = "<group>"; }; 4B3D23761337FBC800DD29B8 /* ObjFW.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjFW.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4B3D23BB1337FC5800DD29B8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = support/Info.plist; sourceTree = SOURCE_ROOT; }; 4B3D5693139A617D0010A78F /* OFSerializationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSerializationTests.m; path = tests/OFSerializationTests.m; sourceTree = "<group>"; }; 4B3ED7C01AF62C30004C8FF1 /* OFGetOptionFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFGetOptionFailedException.h; path = src/exceptions/OFGetOptionFailedException.h; sourceTree = "<group>"; }; 4B3ED7C11AF62C30004C8FF1 /* OFGetOptionFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFGetOptionFailedException.m; path = src/exceptions/OFGetOptionFailedException.m; sourceTree = "<group>"; }; 4B40EC1A189FE2650031E19E /* socket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = socket.m; path = src/socket.m; sourceTree = "<group>"; }; 4B45355113DCFE1E0037AB4D /* OFCountedSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCountedSet.h; path = src/OFCountedSet.h; sourceTree = "<group>"; }; 4B45355213DCFE1E0037AB4D /* OFCountedSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFCountedSet.m; path = src/OFCountedSet.m; sourceTree = "<group>"; }; 4B48B95214DC23B100546D39 /* OFXMLProcessingInstructions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLProcessingInstructions.h; path = src/OFXMLProcessingInstructions.h; sourceTree = "<group>"; }; 4B48B95314DC23B100546D39 /* OFXMLProcessingInstructions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLProcessingInstructions.m; path = src/OFXMLProcessingInstructions.m; sourceTree = "<group>"; }; 4B49EA65143B39CE0005BBC6 /* OFXMLNodeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLNodeTests.m; path = tests/OFXMLNodeTests.m; sourceTree = "<group>"; }; 4B49EA67143B3A090005BBC6 /* OFXMLCDATA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLCDATA.h; path = src/OFXMLCDATA.h; sourceTree = "<group>"; }; |
︙ | |||
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 | + + | 4B29BC38133AC4E80004B236 /* OFCreateDirectoryFailedException.m */, 4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */, 4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */, 4B17FF85133A2E7A003E6DCD /* OFEnumerationMutationException.h */, 4B17FF86133A2E7A003E6DCD /* OFEnumerationMutationException.m */, 4B17FF70133A28FC003E6DCD /* OFException.h */, 4B17FF71133A28FC003E6DCD /* OFException.m */, 4B3ED7C01AF62C30004C8FF1 /* OFGetOptionFailedException.h */, 4B3ED7C11AF62C30004C8FF1 /* OFGetOptionFailedException.m */, 4B8B16FC133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.h */, 4B8B16FD133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.m */, 4B17FFAB133A3586003E6DCD /* OFHTTPRequestFailedException.h */, 4B17FFAC133A3589003E6DCD /* OFHTTPRequestFailedException.m */, 4B17FFA3133A340B003E6DCD /* OFInitializationFailedException.h */, 4B17FFA4133A340D003E6DCD /* OFInitializationFailedException.m */, 4B17FF91133A317A003E6DCD /* OFInvalidArgumentException.h */, |
︙ | |||
1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 | 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 | + | 4B7FF3B4133CED6200000324 /* OFConditionStillWaitingException.h in Headers */, 4B29BC5A133AC8540004B236 /* OFConditionWaitFailedException.h in Headers */, 4B90B7A4133AD87D00BD33CB /* OFConnectionFailedException.h in Headers */, 4B62ED1518566FCA0004E0E3 /* OFCopyItemFailedException.h in Headers */, 4B29BC3F133AC4E80004B236 /* OFCreateDirectoryFailedException.h in Headers */, 4B067FC1177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h in Headers */, 4B17FF87133A2E7B003E6DCD /* OFEnumerationMutationException.h in Headers */, 4B3ED7C21AF62C30004C8FF1 /* OFGetOptionFailedException.h in Headers */, 4B8B16FE133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.h in Headers */, 4B17FFAD133A3591003E6DCD /* OFHTTPRequestFailedException.h in Headers */, 4B17FFA5133A3411003E6DCD /* OFInitializationFailedException.h in Headers */, 4B17FF93133A317C003E6DCD /* OFInvalidArgumentException.h in Headers */, 4B17FF99133A3245003E6DCD /* OFInvalidEncodingException.h in Headers */, 4B17FF9D133A32BA003E6DCD /* OFInvalidFormatException.h in Headers */, 4BC090441584F6760040640F /* OFInvalidJSONException.h in Headers */, |
︙ | |||
2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 | 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 | + | 4B8B170F133A3C11007CD8B3 /* OFConditionWaitFailedException.m in Sources */, 4B90B7A5133AD87D00BD33CB /* OFConnectionFailedException.m in Sources */, 4B62ED1618566FCA0004E0E3 /* OFCopyItemFailedException.m in Sources */, 4B29BC40133AC4E80004B236 /* OFCreateDirectoryFailedException.m in Sources */, 4B067FC2177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m in Sources */, 4B17FF88133A2E7B003E6DCD /* OFEnumerationMutationException.m in Sources */, 4B17FF73133A2A76003E6DCD /* OFException.m in Sources */, 4B3ED7C31AF62C30004C8FF1 /* OFGetOptionFailedException.m in Sources */, 4B8B16FF133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.m in Sources */, 4B17FFAE133A3591003E6DCD /* OFHTTPRequestFailedException.m in Sources */, 4B17FFA6133A3411003E6DCD /* OFInitializationFailedException.m in Sources */, 4B17FF94133A317C003E6DCD /* OFInvalidArgumentException.m in Sources */, 4B17FF9A133A3245003E6DCD /* OFInvalidEncodingException.m in Sources */, 4B17FF9E133A32BA003E6DCD /* OFInvalidFormatException.m in Sources */, 4BC090451584F6760040640F /* OFInvalidJSONException.m in Sources */, |
︙ |
Modified configure.ac from [92cc989460] to [f0cf12e7a4].
︙ | |||
758 759 760 761 762 763 764 765 766 767 768 769 770 771 | 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 | + + + + | AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1, [Whether we have sys/socket.h]) ]) AC_CHECK_HEADERS(netinet/in.h, [ AC_DEFINE(OF_HAVE_NETINET_IN_H, 1, [Whether we have netinet/in.h]) ]) AC_CHECK_HEADERS(netinet/tcp.h, [ AC_DEFINE(OF_HAVE_NETINET_TCP_H, 1, [Whether we have netinet/tcp.h]) ]) AC_CHECK_HEADERS([arpa/inet.h netdb.h]) AC_CHECK_FUNCS([fcntl paccept accept4]) AC_CHECK_FUNC(kqueue, [ AC_DEFINE(HAVE_KQUEUE, 1, [Whether we have kqueue]) AC_SUBST(OFKERNELEVENTOBSERVER_KQUEUE_M, |
︙ |
Modified src/OFTCPSocket.h from [d128094129] to [0e29d56685].
︙ | |||
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + + | uint16_t _SOCKS5Port; } #ifdef OF_HAVE_PROPERTIES @property (readonly, getter=isListening) bool listening; @property (copy) OFString *SOCKS5Host; @property uint16_t SOCKS5Port; @property (getter=isKeepAliveEnabled) bool keepAliveEnabled; @property (getter=isTCPNoDelayEnabled) bool TCPNoDelayEnabled; #endif /*! * @brief Sets the global SOCKS5 proxy host to use when creating a new socket * * @param SOCKS5Host The host to use as a SOCKS5 proxy when creating a new * socket |
︙ | |||
221 222 223 224 225 226 227 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * @param block The block to execute when a new connection has been accepted. * Returns whether the next incoming connection should be accepted * by the specified block as well. */ - (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block; #endif |
Modified src/OFTCPSocket.m from [421ec8b16e] to [43965236bf].
︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | + | #import "OFRunLoop.h" #import "OFRunLoop+Private.h" #import "OFAcceptFailedException.h" #import "OFAlreadyConnectedException.h" #import "OFBindFailedException.h" #import "OFConnectionFailedException.h" #import "OFGetOptionFailedException.h" #import "OFInvalidArgumentException.h" #import "OFListenFailedException.h" #import "OFNotConnectedException.h" #import "OFNotImplementedException.h" #import "OFOutOfMemoryException.h" #import "OFSetOptionFailedException.h" |
︙ | |||
558 559 560 561 562 563 564 | 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | - (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block { [OFRunLoop OF_addAsyncAcceptForTCPSocket: self block: block]; } #endif |
Modified src/exceptions/Makefile from [240c5de2f4] to [a378c35d59].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + | OFChangePermissionsFailedException.m \ OFChecksumFailedException.m \ OFCopyItemFailedException.m \ OFCreateDirectoryFailedException.m \ OFCreateSymbolicLinkFailedException.m \ OFEnumerationMutationException.m \ OFException.m \ OFGetOptionFailedException.m \ OFHashAlreadyCalculatedException.m \ OFInitializationFailedException.m \ OFInvalidArgumentException.m \ OFInvalidEncodingException.m \ OFInvalidFormatException.m \ OFInvalidJSONException.m \ OFInvalidServerReplyException.m \ |
︙ |
Added src/exceptions/OFGetOptionFailedException.h version [2663a78065].
|
Added src/exceptions/OFGetOptionFailedException.m version [16f7ecbd09].
|
Modified src/socket.h from [046f5f35a5] to [f008ed8126].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | + + + | #include <fcntl.h> #ifdef OF_HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif #ifdef OF_HAVE_NETINET_IN_H # include <netinet/in.h> #endif #ifdef OF_HAVE_NETINET_TCP_H # include <netinet/tcp.h> #endif #ifdef _WIN32 # ifdef __MINGW32__ # include <_mingw.h> # ifdef __MINGW64_VERSION_MAJOR # include <winsock2.h> |
︙ |