Categorygithub.com/codecat/melody
modulepackage
0.0.0-20250130102310-432c126e8fda
Repository: https://github.com/codecat/melody.git
Documentation: pkg.go.dev

# README

melody

:notes: Minimalist websocket framework for Go.

Melody is websocket framework based on github.com/fasthttp/websocket that abstracts away the tedious parts of handling websockets. It gets out of your way so you can write real-time apps. Features include:

  • Clear and easy interface similar to net/http or Gin.
  • A simple way to broadcast to all or selected connected sessions.
  • Message buffers making concurrent writing safe.
  • Automatic handling of sending ping/pong heartbeats that timeout broken sessions.
  • Store data on sessions.

Full readme

This is a fork that attempts to add support for fasthttp.

Please refer to the original project for more details.

# Functions

FormatCloseMessage formats closeCode and text as a WebSocket close message.
New creates a new melody instance with default Upgrader and Config.

# Constants

Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.
Close codes defined in RFC 6455, section 11.7.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Config melody configuration struct.
Melody implements a websocket manager.
Session wrapper around websocket connections.