go-ws

command module
v0.0.0-...-d761a6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 7 Imported by: 0

README

WebSocket implementation for Go.

This project is WIP

I've started this project out of curiosity how the WebSocket protocol is working under the hood. I really hope that I'll be able to finish it so that it could be used as a WebSocket library for Go in the feature.

Project status

It looks like it could be used already. There is some restructuring required to make this blazingly fast, but before that I need to make sure it supports everything I want correctly.

  • Understand available options for permessage-deflate and what they mean
  • Work on error handling, to report descriptive errors to api users
  • Write more tests (and test utils)
Upgrading HTTP to WebSocket
  • Checking handshake
  • Checking origin
  • Retrieving Sec-WebSocket-Key and generating access key
  • Resolving protocol
  • Checking for data sent after opening handshake but before getting the opening confirmation
  • Extensions (and everything related with them)
Communication with the client
  • Decoding incoming frames (getting fin, rsv1, rsv2, rsv3, opcode, mask, etc.)
  • Unmasking payload
  • Writing data to the client (add support for everything described in RFC)
  • Add support for different opcodes
  • Closing the connection (make sure that it works as expected)
  • Working with buffers (need to do more reaserch on that. How, when and if should I use them for reading / writing data)
  • Fragmentation (only not fragmented frames are supported right now)

I hope this todo list will become clearer with time as I'll understand each part more deeply.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL