# tidwall/SwiftWebSocket

Fast Websockets in Swift for iOS and OSX

Repository: https://github.com/tidwall/SwiftWebSocket
Canonical: https://ross.abutalabs.com/products/swiftwebsocket
Language: Swift
License: MIT
License Family: permissive
Topics: networking
Archived: true
Last push: 2021-08-19T15:47:35+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4117, "days_push": 1840, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1547, forks 242 (observed 2026-08-28T04:05:01.787158+00:00)

## What it is
SwiftWebSocket is a high-performance WebSocket client library for iOS and macOS, fully conforming to RFC 6455 and passing all 521 Autobahn fuzzing tests. It provides a JavaScript-style event API with TLS/WSS support, custom headers, ping/pong events, and permessage-deflate compression.

## Use cases
- add websocket connectivity to an ios app in swift
- connect to a websocket server from a macos application
- swift websocket client with tls wss support
- receive compressed websocket messages permessage-deflate in swift
- send and receive binary websocket messages in swift
- reuse and reopen websocket connections in an ios app
- set custom http headers on websocket handshake requests

## When to choose
- building native iOS or macOS apps in Swift or Objective-C that need a standards-compliant WebSocket client
- you want a lightweight, dependency-free client with proven protocol correctness via Autobahn test conformance
- you need TLS/WSS, self-signed certificate options, or message compression out of the box

## When to avoid
- you need a WebSocket server implementation rather than a client
- your project targets platforms outside Apple's ecosystem, such as Android, Linux, or Windows
- you require actively maintained dependencies with recent releases, since the maintainer is seeking a successor and the last release was in 2021
- Apple's built-in URLSessionWebSocketTask is sufficient for your use case and you prefer first-party APIs

## Facets
- artifact type: library
- maturity: maintenance
- function: websocket
- domain: networking, mobile-development, web-development
- platform: -
- tags: websocket-client, rfc-6455, tls, wss, permessage-deflate, compression, autobahn-tested, event-driven-api, apple-platforms, swift, ios, macos

## Member repositories
- tidwall/SwiftWebSocket (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:01.787158+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:30:30.749337+00:00, confidence not recorded.
  - readme: https://github.com/tidwall/SwiftWebSocket (fetched 2026-08-28T04:05:01.787158+00:00, sha c208a208e01d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
