Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soypat/peasocket
little websocket implementation
https://github.com/soypat/peasocket
embedded embedded-systems go golang websocket websocket-client websocket-protocol websocket-server websockets
Last synced: 3 months ago
JSON representation
little websocket implementation
- Host: GitHub
- URL: https://github.com/soypat/peasocket
- Owner: soypat
- License: mit
- Created: 2022-12-24T12:38:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T15:20:17.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T09:11:45.136Z (3 months ago)
- Topics: embedded, embedded-systems, go, golang, websocket, websocket-client, websocket-protocol, websocket-server, websockets
- Language: Go
- Homepage:
- Size: 156 KB
- Stars: 36
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tinygo - peasocket - Dead-simple, extensible websocket implementation in Go. (Embedded Systems / Protocol implementations)
README
[![Go Report Card](https://goreportcard.com/badge/github.com/soypat/peasocket)](https://goreportcard.com/report/github.com/soypat/peasocket)
[![GoDoc](https://godoc.org/github.com/soypat/peasocket?status.svg)](https://godoc.org/github.com/soypat/peasocket)
[![codecov](https://codecov.io/gh/soypat/peasocket/branch/main/graph/badge.svg)](https://codecov.io/gh/soypat/peasocket/branch/main)# 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.