Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultWriter = "lrpc-trait"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Argument ¶
type Argument struct { Message *message.Message Conn transport.ConnAdapter Encoder packer.Packer // 用于统一内存复用的池, 类型是: *container.Slice[byte] Pool *sync.Pool // 不为nil时则说明Server开启了Debug模式 // 为true表示开启了Mux OnDebug func([]byte, bool) // 在消息发送完成时会调用 OnComplete func([]byte, perror.LErrorDesc) EHandle perror.LErrors }
type Writer ¶
Writer 写入器的实现必须是线程安全的 写入器的抽象与解析器不一样, 解析器要处理multi data & half package 写入器使用的Conn API都是同步的, 所以不用处理half package, 写入器的设计 本身就不能处理多份数据
func NewJsonRPC2 ¶
func NewLRPCMux ¶
func NewLRPCNoMux ¶
func NewLRPCTrait ¶
Click to show internal directories.
Click to hide internal directories.