sona

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAddrEmptyErr

func IsAddrEmptyErr(err error) bool

Types

type Sona

type Sona struct {
	// contains filtered or unexported fields
}

func New

func New() *Sona

func (*Sona) Broadcast

func (s *Sona) Broadcast(path string, data []byte)

func (*Sona) EnableSSE

func (s *Sona) EnableSSE(ctx context.Context, addr string) *Sona

func (*Sona) EnableWS

func (s *Sona) EnableWS(ctx context.Context, addr string) *Sona

func (*Sona) OnConnect

func (s *Sona) OnConnect(action func(w http.ResponseWriter, r *http.Request)) *Sona

func (*Sona) OnDisconnect

func (s *Sona) OnDisconnect(action func(w http.ResponseWriter, r *http.Request)) *Sona

func (*Sona) OnSend

func (s *Sona) OnSend(action func(w http.ResponseWriter, r *http.Request)) *Sona

func (*Sona) Run

func (s *Sona) Run() error

func (*Sona) SetTLSFile

func (s *Sona) SetTLSFile(certFile, keyFile string) *Sona

func (*Sona) Stop

func (s *Sona) Stop()

Jump to

Keyboard shortcuts

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