Skip to content
/ oimws Public
forked from openimsdk/oimws

A websocket and tcp framework for openim

License

Notifications You must be signed in to change notification settings

wanbeila/oimws

Repository files navigation

OpenIMProtocolFramework

Build Status Codecov Go Report Card GoDoc

🎶 Minimalist websocket framework for Go.

Melody is websocket framework based on github.com/gorilla/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.

Install

go get github.com/openim-sigs/oimws

Build example

make build

Start example

make start

An encapsulated framework within jssdk connecting to openim-sdk-core, providing streamlined management and integration of WebSocket, TCP, and HTTP protocols in the OpenIM ecosystem.

Features

  • Protocol Management: Seamless management and integration of WebSocket, TCP, and HTTP protocols.
  • Encoding and Decoding: Handle message encoding and decoding for cross-language compatibility.
  • Protocol Implementation: Implement basic OpenIM protocols like login, push, etc.
  • Event Handling: Convert received messages into corresponding events and pass them to upper layer applications for processing.

Getting Started

Installation

Clone the repository to your local machine:

git clone https://github.com/openim-sigs/oimws.git
cd oimws

Usage

Import the necessary modules and initialize the protocol framework:

go

Contribution

Feel free to contribute to this project by opening issues or submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A websocket and tcp framework for openim

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.2%
  • Makefile 9.0%
  • Other 0.8%