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