Skip to content
@wspulse

wspulse

WebSocket pub/sub protocol — Go library

wspulse

A modular WebSocket library ecosystem — minimal, production-ready, and easy to integrate. Go server, with first-party clients for Go, TypeScript, Kotlin/Android, and Swift/Apple.

Architecture

graph LR
    core["<b>core</b><br/>Frame · Codec · Router"]
    server["<b>server</b><br/>Server · Connection · Hub"]
    client-go["<b>client-go</b><br/>Client · Dial · Backoff"]
    client-ts["<b>client-ts</b><br/>Client · Connect · Backoff"]
    client-kt["<b>client-kt</b><br/>Client · Connect · Backoff"]
    client-swift["<b>client-swift</b><br/>Client · Connect · Backoff"]
    server --> core
    client-go --> core
    client-ts -. "same wire protocol" .-> server
    client-kt -. "same wire protocol" .-> server
    client-swift -. "same wire protocol" .-> server
Loading
Module Language Description
core Go Shared types (Frame, Codec, sentinel errors) and Gin-style event router. Zero external dependencies.
server Go WebSocket server: room routing, session resumption, heartbeat, backpressure.
client-go Go Go client: auto-reconnect, exponential backoff, lifecycle callbacks.
client-ts TypeScript TypeScript client: auto-reconnect, exponential backoff. Browser + Node.js.
client-kt Kotlin Kotlin/JVM + Android client: auto-reconnect, exponential backoff. Ktor CIO + coroutines.
client-swift Swift Swift client: auto-reconnect, exponential backoff. Actor-based concurrency. iOS 16+ · macOS 13+.

Where to Start

I want to… Go to
Build a WebSocket server server README
Connect from Go client-go README
Connect from TypeScript client-ts README
Connect from Kotlin/Android client-kt README
Connect from Swift/Apple client-swift README
Route frames by event name core/router
Understand the wire protocol doc/protocol.md
Understand server internals server/doc/internals.md
Contribute CONTRIBUTING.md

Key Features

  • Room-based routing — connections are partitioned into rooms; broadcast targets a single room
  • Session resumption — configurable grace window; transparent WebSocket swap on reconnect
  • Event router — Gin-style middleware chain for dispatching frames by event name (core/router)
  • Pluggable codecs — JSON by default; swap in Protobuf, MessagePack, or any custom encoding
  • Auto-reconnect — client-side exponential backoff with configurable retries
  • Any HTTP router — standard http.Handler; works with net/http, Gin, Chi, Echo, etc.
  • Cross-platform TypeScript client — single package for Node.js (ws) and browsers (native WebSocket)

Roadmap

First-party client libraries are planned for Python — all implementing the same wire protocol and behaviour contract.

Status

Module Version
server v0.3.0
core v0.2.0
client-go v0.3.0
client-ts v0.3.0
client-kt v0.3.0
client-swift v0.2.0

APIs are being stabilized. Breaking changes may occur before v1.

License

All modules are released under the MIT License.

Pinned Loading

  1. server server Public

    Minimal, production-ready WebSocket server library for Go. Manages concurrent connections, room-based broadcasting, session resumption, and heartbeat. Built on github.com/wspulse/core.

    Go

  2. client-go client-go Public

    Go WebSocket client with automatic reconnection and exponential backoff. Configurable via functional options — message callbacks, codec, and retry limits. Built on github.com/wspulse/core.

    Go

  3. client-kt client-kt Public

    Kotlin WebSocket client for JVM and Android with auto-reconnect, exponential backoff, and heartbeat. Designed for use with wspulse/server.

    Kotlin

  4. client-ts client-ts Public

    TypeScript WebSocket client with auto-reconnect for wspulse/server

    TypeScript

  5. client-swift client-swift Public

    Swift WebSocket client for Apple platforms — auto-reconnect, exponential backoff, actor-based concurrency. iOS 16+ · macOS 13+ · watchOS 9+ · tvOS 16+

    Swift

Repositories

Showing 10 of 10 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…