websocket is a minimal and idiomatic WebSocket library for Go. Minimal and idiomatic API. First class context.Context support. Fully passes the WebSocket autobahn-testsuite. Single dependency. JSON and protobuf helpers in the wsjson and wspb subpackages. Zero alloc reads and writes. Concurrent writes. Close handshake. net.Conn wrapper. Ping pong API. RFC 7692 permessage-deflate compression. Compile to Wasm. Transparent message buffer reuse with wsjson and wspb subpackages. Gorilla writes directly to a net.Conn and so duplicates features of net/http.Client. Gorilla requires registering a pong callback before sending a Ping. Compare godoc of nhooyr.io/websocket with gorilla/websocket side by side. Will enable easy HTTP/2 support in the future.

Features

  • Mature and widely used
  • Prepared writes
  • Configurable buffer sizes
  • Minimal and idiomatic API
  • Zero alloc reads and writes
  • Full context.Context support
  • Transparent message buffer reuse with wsjson and wspb subpackages

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow websocket for Go

websocket for Go Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of websocket for Go!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Libraries, Go WebSocket Libraries

Registered

2023-01-18