Categorygithub.com/gjbae1212/go-ws-broadcast
modulepackage
1.0.0
Repository: https://github.com/gjbae1212/go-ws-broadcast.git
Documentation: pkg.go.dev

# README

go-ws-websocket

go-ws-websocket is a package that Websocket clients which are registered a broker broadcast messages.

license

Installation

$ go get -u github.com/gjbae1212/go-ws-websocket

Usage

# create braker
broker, _ :=  NewBreaker()

# register 
client, _ := broker.Register(websocket)

# unregister 
_ = broker.Register(client)

# broadcast message
_ = broker.BroadCast(message)   

LICENSE

This project is following The MIT.

# Functions

NewBreaker returns a breaker for websocket.
NewClient creates client for websocket.
WithErrorHandlerOption returns a function which sets error handler.
WithMaxMessagePoolLength returns a function that sets a pool size, which how many data sends with nonblocking.
WithMaxReadLimit returns a function which sets max size how many data reads from websocket.

# Variables

No description provided by the author

# Structs

Client is websocket client.

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author