sockjs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2016 License: Apache-2.0 Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultExecuter = func(session sockjs.Session) error {
	for {
		msg, err := session.Recv()
		if err != nil {
			return err
		}
		err = session.Send(msg)
		if err != nil {
			return err
		}
	}
}

Functions

func HanderWrapper

func HanderWrapper(v interface{}) echo.Handler

func Websocket

func Websocket(prefix string, executer func(sockjs.Session) error, validate func(echo.Context) error, opts ...sockjs.Options) echo.HandlerFunc

Types

type Handler

type Handler interface {
	Handle(sockjs.Session) error
	Options() sockjs.Options
	Validate(echo.Context) error
	Prefix() string
}

type Options

type Options struct {
	Handle   func(sockjs.Session) error
	Options  sockjs.Options
	Validate func(echo.Context) error
	Prefix   string
}

func (Options) Wrapper

func (o Options) Wrapper(e *echo.Echo)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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