Skip to content

relaytools/go-wsstat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-wsstat Go Documentation MIT License

Use the go-wsstat Golang package to trace WebSocket connection and latency in your Go applications. It wraps the gorilla/websocket package for the WebSocket protocol implementation, and measures the duration of the different phases of the connection cycle. The program takes inspiration from the go-httpstat package, which is useful for tracing HTTP requests.

Install

The package is built on Go 1.21 but it has been tested to work with Go 1.18, in case that is of interest. Install to use in your project with go get:

go get github.com/jakobilobi/go-wsstat

Usage

The _example/main.go program demonstrates how to use the go-wsstat package to trace a WebSocket connection.

Run the example:

go run _example/main.go <a WebSocket URL>

Run the tests:

make test

About

Trace WebSocket connection and latency in your Golang project.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.2%
  • Makefile 1.8%