Skip to content

Commit

Permalink
pull in nw_socket branch of aws-c-io
Browse files Browse the repository at this point in the history
  • Loading branch information
sbSteveK committed Nov 8, 2024
1 parent 599ce74 commit 8305325
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ let cSettings: [CSetting] = [
.define("AWS_APPSTORE_SAFE"),
]

/// Store any defines that will be used by Swift Tests in swiftTestSettings
var swiftTestSettings: [SwiftSetting] = []

//////////////////////////////////////////////////////////////////////
/// Configure C targets.
/// Note: We can not use unsafe flags because SwiftPM makes the target ineligible for use by other packages.
Expand Down Expand Up @@ -124,14 +127,24 @@ awsCIoPlatformExcludes.append("source/posix")
awsCIoPlatformExcludes.append("source/linux")
awsCIoPlatformExcludes.append("source/s2n")
awsCIoPlatformExcludes.append("source/darwin")
cSettingsIO.append(.define("AWS_USE_IO_COMPLETION_PORTS"))
swiftTestSettings.append(.define("AWS_USE_IO_COMPLETION_PORTS"))
#elseif os(Linux)
awsCIoPlatformExcludes.append("source/windows")
awsCIoPlatformExcludes.append("source/bsd")
awsCIoPlatformExcludes.append("source/darwin")
cSettingsIO.append(.define("AWS_USE_EPOLL"))
swiftTestSettings.append(.define("AWS_USE_EPOLL"))
#else // macOS, iOS, watchOS, tvOS
awsCIoPlatformExcludes.append("source/windows")
awsCIoPlatformExcludes.append("source/linux")
awsCIoPlatformExcludes.append("source/s2n")
cSettingsIO.append(.define("__APPLE__"))
cSettingsIO.append(.define("AWS_USE_DISPATCH_QUEUE", .when(platforms: [.iOS, .tvOS])))
cSettingsIO.append(.define("AWS_USE_KQUEUE", .when(platforms: [.macOS])))
swiftTestSettings.append(.define("__APPLE__"))
swiftTestSettings.append(.define("AWS_USE_DISPATCH_QUEUE", .when(platforms: [.iOS, .tvOS])))
swiftTestSettings.append(.define("AWS_USE_KQUEUE", .when(platforms: [.macOS])))
#endif

//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -304,7 +317,8 @@ packageTargets.append(contentsOf: [
path: "Test/AwsCommonRuntimeKitTests",
resources: [
.process("Resources")
]
],
swiftSettings: swiftTestSettings
),
.executableTarget(
name: "Elasticurl",
Expand Down
2 changes: 1 addition & 1 deletion aws-common-runtime/aws-c-io
Submodule aws-c-io updated 42 files
+8 −0 .github/ISSUE_TEMPLATE/bug-report.yml
+8 −2 .github/workflows/ci.yml
+32 −0 .github/workflows/issue-regression-labeler.yml
+19 −11 CMakeLists.txt
+54 −14 README.md
+74 −352 include/aws/io/event_loop.h
+8 −0 include/aws/io/io.h
+66 −0 include/aws/io/private/dispatch_queue.h
+379 −0 include/aws/io/private/event_loop_impl.h
+51 −4 include/aws/io/socket.h
+1 −0 include/aws/testing/io_testing_channel.h
+3 −3 source/bsd/kqueue_event_loop.c
+7 −1 source/channel.c
+8 −12 source/channel_bootstrap.c
+501 −0 source/darwin/dispatch_queue_event_loop.c
+1,610 −0 source/darwin/nw_socket.c
+13 −15 source/darwin/secure_transport_tls_channel_handler.c
+255 −91 source/event_loop.c
+3 −2 source/exponential_backoff_retry_strategy.c
+13 −54 source/future.c
+4 −5 source/linux/epoll_event_loop.c
+1 −0 source/posix/pipe.c
+77 −21 source/posix/socket.c
+6 −7 source/s2n/s2n_tls_channel_handler.c
+101 −0 source/socket.c
+2 −1 source/windows/iocp/iocp_event_loop.c
+1 −0 source/windows/iocp/pipe.c
+108 −55 source/windows/iocp/socket.c
+17 −4 tests/CMakeLists.txt
+1 −0 tests/alpn_handler_test.c
+5 −1 tests/byo_crypto_test.c
+8 −1 tests/channel_test.c
+48 −12 tests/default_host_resolver_test.c
+36 −13 tests/event_loop_test.c
+20 −5 tests/exponential_backoff_retry_test.c
+1 −0 tests/future_test.c
+1 −0 tests/pipe_test.c
+4 −2 tests/pkcs11_test.c
+20 −3 tests/socket_handler_test.c
+319 −18 tests/socket_test.c
+7 −1 tests/standard_retry_test.c
+21 −4 tests/tls_handler_test.c

0 comments on commit 8305325

Please sign in to comment.