Versions in this module Expand all Collapse all v0 v0.2.0 Jul 29, 2022 Changes in this version + type CallCmd struct + Args []reflect.Value + Id uint32 + Session uint32 + func (c *CallCmd) ReadFrom(r io.Reader, p *Point) (n int64, err error) + func (c *CallCmd) WriteTo(w io.Writer) (n int64, err error) + type Cmd = uint8 + const CmdCall + const CmdDef + const CmdError + const CmdPing + const CmdPong + const CmdReturn + type Command interface + ReadFrom func(io.Reader, *Point) (int64, error) + WriteTo func(io.Writer) (int64, error) + type CommandNewer = func() Command + type DefCmd struct + Id uint32 + Name string + func (c *DefCmd) ReadFrom(r io.Reader, p *Point) (n int64, err error) + func (c *DefCmd) WriteTo(w io.Writer) (n int64, err error) + type Errid = uint16 + const ErrArgs + const ErrNotExists + const ErrString + type ErrorCmd struct + Errid Errid + Msg string + Ptrs []reflect.Value + Session uint32 + func (c *ErrorCmd) ReadFrom(r io.Reader, p *Point) (n int64, err error) + func (c *ErrorCmd) WriteTo(w io.Writer) (n int64, err error) + type PingCmd struct + Data uint64 + func (c *PingCmd) ReadFrom(r io.Reader, p *Point) (n int64, err error) + func (c *PingCmd) WriteTo(w io.Writer) (n int64, err error) + type Point struct + func NewPoint(w io.Writer, r io.ReadCloser) (p *Point) + func NewPointWithCtx(w io.Writer, r io.ReadCloser, ctx context.Context) (p *Point) + func (p *Point) Call(name string, args ...any) (res any, err error) + func (p *Point) Close() (err error) + func (p *Point) DefineCmd(id Cmd, newer CommandNewer) + func (p *Point) Listen() + func (p *Point) ListenAndWait() (err error) + func (p *Point) Ping() (err error) + func (p *Point) Register(name string, fuc any) (err error) + func (p *Point) SendCommand(id Cmd, cmd Command) (err error) + func (p *Point) Wait() (err error) + type PongCmd struct + Data uint64 + func (c *PongCmd) ReadFrom(r io.Reader, p *Point) (n int64, err error) + func (c *PongCmd) WriteTo(w io.Writer) (n int64, err error) + type RemoteErr struct + func (e *RemoteErr) Error() string + type ReturnCmd struct + Ptrs []reflect.Value + Res reflect.Value + Session uint32 + func (c *ReturnCmd) ReadFrom(r io.Reader, p *Point) (n int64, err error) + func (c *ReturnCmd) WriteTo(w io.Writer) (n int64, err error)