Latest 1.0.0
License MIT
Platforms ios 5.0, tvos 9.0, osx 10.7, requires ARC
Dependencies CocoaAsyncSocket, CocoaLumberjack

A middleware for CocoaAsyncSocket’s TCP GCDAsyncSocket.

Note: while this code has been in production in Paw for a while, it still needs structural improvements to be a nice library. Also, some unit tests would be very useful. Contributions are more than welcome! :)

Improvements over GCDAsyncSocket

  • Implements the Happy Eyeballs Algorithm to connect to the fastest host (IPv4 or IPv6) when both are returned by the DNS server
  • Wraps nicely all read operations (read until a data has been found, read a given number of bytes, read until connection close)
  • Wraps GCDAsyncSocket, so the caller can abstract itself from other details
  • Adds a new delegate callback didResolveHostnameWithIPv4Address: as soon as DNS resolution happens


Copyright 2016 Paw. MIT License. See LICENSE.

Latest podspec

    "name": "LMGCDAsyncSocketMiddleware",
    "version": "1.0.0",
    "license": "MIT",
    "homepage": "",
    "authors": {
        "Micha Mazaheri": "[email protected]"
    "summary": "A middleware for CocoaAsyncSocket's TCP GCDAsyncSocket",
    "source": {
        "git": "",
        "tag": "1.0.0"
    "source_files": "Source/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "CocoaAsyncSocket": [
            "~> 7.4.3"
        "CocoaLumberjack": [
            "~> 2.0"
    "platforms": {
        "ios": "5.0",
        "tvos": "9.0",
        "osx": "10.7"

Pin It on Pinterest

Share This