async

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt Option) server.Handler

Types

type Handler

type Handler interface {
	OnConnect(cc conn.Conn)
	SliceIndex(b []byte) int
	OnWork(b []byte, writeChan chan<- []byte) error
	OnWorkProcessStop()
	OnReadProcessStop()
	OnWriteProcessStop()
	OnWriteFinish(b []byte)
	OnWriteError(b []byte, err error) (ifExit bool)
	OnClose()
}

type Option

type Option struct {
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	Creator      func() Handler
	Context      context.Context
}

Jump to

Keyboard shortcuts

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