Skip to content

soypat/peasocket

Repository files navigation

Go Report Card GoDoc codecov

peasocket

Little websocket implementation

Highlights

  • Zero allocations when fragmenting messages with WriteFragmentedMessage

  • Empty go.mod file.

  • Lockless base implementation

  • Dead-simple Client implementation

    • No channels
    • No goroutines
    • 1 Mutex on state and another on Tx to auto-reply pings.
  • Ready for use in embedded systems

  • Tinygo compatible.

  • Base implementation is very simple, 1000 lines of code excluding Client. This makes debugging and testing easy.

  • Easy to extend. Exposes all websocket functionality.

cmd/peacho Command

A echoing client. Connects to a server and echoes back any messages received.