Versions in this module Expand all Collapse all v6 v6.3.6 Mar 4, 2021 v6.3.5 Mar 3, 2021 Changes in this version + var ErrExceedMessageSizeLimit = errors.New("size of package exceeds limit") + var ErrProactivelyCloseSocket = errors.New("socket is closed proactively") + var NewStatus = status.New + var NewStatusWithStack = status.NewWithStack + var RawProtoFunc = func(rw IOWithReadBuffer) Proto + func MessageSizeLimit() uint32 + func PutMessage(m Message) + func ReadBuffer() (bytes int, isDefault bool) + func SetDefaultProtoFunc(protoFunc ProtoFunc) + func SetKeepAlive(keepalive bool) + func SetKeepAlivePeriod(d time.Duration) + func SetMessageSizeLimit(maxMessageSize uint32) + func SetNoDelay(_noDelay bool) + func SetReadBuffer(bytes int) + func SetWriteBuffer(bytes int) + func TryOptimize(conn net.Conn) + func WriteBuffer() (bytes int, isDefault bool) + type Body interface + Body func() interface{} + BodyCodec func() byte + MarshalBody func() ([]byte, error) + SetBody func(body interface{}) + SetBodyCodec func(bodyCodec byte) + SetNewBody func(NewBodyFunc) + UnmarshalBody func(bodyBytes []byte) error + type Header interface + Meta func() *utils.Args + Mtype func() byte + Seq func() int32 + ServiceMethod func() string + SetMtype func(byte) + SetSeq func(int32) + SetServiceMethod func(string) + SetStatus func(*Status) + Status func(autoInit ...bool) *Status + StatusOK func() bool + type IOWithReadBuffer interface + type Message interface + AsBody func() Body + AsHeader func() Header + Context func() context.Context + Reset func(settings ...MessageSetting) Message + SetSize func(size uint32) error + Size func() uint32 + String func() string + XferPipe func() *xfer.XferPipe + func GetMessage(settings ...MessageSetting) Message + func NewMessage(settings ...MessageSetting) Message + type MessageSetting func(Message) + func WithAddMeta(key, value string) MessageSetting + func WithBody(body interface{}) MessageSetting + func WithBodyCodec(bodyCodec byte) MessageSetting + func WithContext(ctx context.Context) MessageSetting + func WithDelMeta(key string) MessageSetting + func WithNewBody(newBodyFunc NewBodyFunc) MessageSetting + func WithNothing() MessageSetting + func WithServiceMethod(serviceMethod string) MessageSetting + func WithSetMeta(key, value string) MessageSetting + func WithStatus(stat *Status) MessageSetting + func WithXferPipe(filterID ...byte) MessageSetting + type NewBodyFunc func(Header) interface + type Proto interface + Pack func(Message) error + Unpack func(Message) error + Version func() (byte, string) + type ProtoFunc func(IOWithReadBuffer) Proto + func DefaultProtoFunc() ProtoFunc + type Socket interface + Close func() error + ControlFD func(f func(fd uintptr)) error + ID func() string + LocalAddr func() net.Addr + Raw func() net.Conn + Read func(b []byte) (n int, err error) + ReadMessage func(message Message) error + RemoteAddr func() net.Addr + Reset func(netConn net.Conn, protoFunc ...ProtoFunc) + SetDeadline func(t time.Time) error + SetID func(string) + SetReadDeadline func(t time.Time) error + SetWriteDeadline func(t time.Time) error + Swap func(newSwap ...goutil.Map) goutil.Map + SwapLen func() int + Write func(b []byte) (n int, err error) + WriteMessage func(message Message) error + func GetSocket(c net.Conn, protoFunc ...ProtoFunc) Socket + func NewSocket(c net.Conn, protoFunc ...ProtoFunc) Socket + type SocketHub struct + func NewSocketHub() *SocketHub + func (sh *SocketHub) ChangeID(newID string, socket Socket) + func (sh *SocketHub) Delete(id string) + func (sh *SocketHub) Get(id string) (Socket, bool) + func (sh *SocketHub) Len() int + func (sh *SocketHub) Random() (Socket, bool) + func (sh *SocketHub) Range(f func(Socket) bool) + func (sh *SocketHub) Set(socket Socket) + type Status = status.Status + type UnsafeSocket interface + RawLocked func() net.Conn Other modules containing this package github.com/fyyang/erpc