network/handler_type.go

10 lines
295 B
Go
Raw Normal View History

2022-10-11 17:36:09 +08:00
package network
import "git.hpds.cc/Component/network/frame"
// AsyncHandler is the request-response mode (async)
type AsyncHandler func([]byte) (byte, []byte)
// PipeHandler is the bidirectional stream mode (blocking).
type PipeHandler func(in <-chan []byte, out chan<- *frame.PayloadFrame)