CocoaAsyncSocket is an asynchronous socket networking library for Mac, iOS, and tvOS.
CocoaAsyncSocket solves the problem of managing network communication without blocking application threads. The library provides two main components: GCDAsyncSocket for TCP/IP networking and support for UDP. It builds on Grand Central Dispatch to handle socket operations asynchronously, managing queued reads and writes, buffering, and automatic connection handling. The TCP implementation runs entirely within its own GCD dispatch queue and is thread-safe, with delegate methods invoked asynchronously onto a queue of your choosing.
Developers should choose this library if they need straightforward asynchronous networking for Apple platforms without manually managing low-level socket operations. It suits projects requiring TCP or UDP communication with features like TLS/SSL support, IPv4 and IPv6 compatibility, and automatic server socket acceptance. The library is self-contained in native Objective-C and can be integrated via CocoaPods, Carthage, Swift Package Manager, or manual inclusion. It supports both Objective-C and Swift projects.
The project maintains active build status verification and is distributed under public domain terms. The codebase remains focused on its core networking functionality without expanding into unrelated areas.