Swift async/await based socket library
This library exposes an idiomatic Swift API for interacting with POSIX sockets via an async/await interface. What makes this library unique (even to the point that Swift NIO is still using a custom socket / thread pool) is that it was built exclusively using Swift Concurrency and doesn't use old blocking C APIs, CFSocket, DispatchIO, CFRunloop, GCD, or explicitly create a single thread outside of the Swift's global cooperative thread pool to manage the sockets and polling.
The result is a Socket API that is optimized for async/await and built from the group up. Additionally, like the System, and Concurrency APIs, the Socket is represented as a
struct instead of a class, greatly reducing ARC overhead. The internal state for the socket is managed by a singleton that stores both its state, and keeps an array of managed file descriptors so polling is global.
|Last commit: 3 weeks ago|
Full Changelog: https://github.com/PureSwift/Socket/compare/0.3.1...0.3.2
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics