webtrans

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

func NewSession

func NewSession(sessionId string, con *websocket.Conn, signal *Signal) *Session

func (*Session) Close

func (s *Session) Close()

func (*Session) Emit

func (s *Session) Emit(header string, body string) error

func (*Session) Handle

func (s *Session) Handle(r *http.Request)

func (*Session) ID

func (s *Session) ID() string

func (*Session) On

func (s *Session) On(header string, cb proto.SessionCallback)

type Signal

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

func NewSignal

func NewSignal(port int, certFile, keyFile string) *Signal

func (*Signal) OnAuth added in v0.0.3

func (s *Signal) OnAuth(cb proto.AuthCallback)

func (*Signal) OnClose

func (s *Signal) OnClose(cb proto.SignalCallback)

func (*Signal) OnConnect

func (s *Signal) OnConnect(cb proto.SignalCallback)

func (*Signal) Run

func (s *Signal) Run() error

type SignalHandler

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

func NewSignalHandler

func NewSignalHandler(signal *Signal) *SignalHandler

func (*SignalHandler) ServeHTTP

func (sh *SignalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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