Zero-copy upgrade. No intermediate allocations during I/O. Low-level API which allows building your own logic of packet handling and buffers reuse. High-level wrappers and helpers around API in wsutil package, which allow to start fast without digging the protocol internals. Existing WebSocket implementations do not allow users to reuse I/O buffers between connections in clear way. This library aims to export efficient low-level interface for working with the protocol without forcing only one way it could be used. Library is tagged as v1* so its API must not be broken during some improvements or refactoring. Example applications using ws are developed in separate repository ws-examples. We can apply the same pattern to read and write structured responses through a JSON encoder and decoder.Zero-copy upgrade helps to avoid unnecessary allocations and copying while handling HTTP Upgrade request.

Features

  • No intermediate allocations during I/O
  • Low-level API which allows to build your own logic of packet handling and buffers reuse
  • Zero-copy upgrade
  • High-level wrappers and helpers around API in wsutil package, which allow to start fast without digging the protocol internals
  • Library is tagged as v1* so its API must not be broken during some improvements or refactoring
  • This implementation of RFC6455 passes Autobahn Test Suite and currently has about 78% coverage

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow ws

ws Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of ws!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Libraries, Go WebSocket Servers, Go WebSocket Libraries

Registered

2023-01-10