Versions in this module Expand all Collapse all v1 v1.24.4 Aug 19, 2016 Changes in this version + const AddrTypeDomain + const AddrTypeIPv4 + const AddrTypeIPv6 + const Version + var ErrCommandTooLarge = errors.New("Command too large.") + var ErrCommandTypeMismatch = errors.New("Command type mismatch.") + var ErrUnknownCommand = errors.New("Unknown command.") + func Authenticate(b []byte) uint32 + func MarshalCommand(command interface{}, writer io.Writer) error + func UnmarshalCommand(cmdId byte, data []byte) (protocol.ResponseCommand, error) + type ClientSession struct + func NewClientSession(idHash protocol.IDHash) *ClientSession + func (this *ClientSession) DecodeResponseBody(reader io.Reader) io.Reader + func (this *ClientSession) DecodeResponseHeader(reader io.Reader) (*protocol.ResponseHeader, error) + func (this *ClientSession) EncodeRequestBody(writer io.Writer) io.Writer + func (this *ClientSession) EncodeRequestHeader(header *protocol.RequestHeader, writer io.Writer) + type CommandFactory interface + Marshal func(command interface{}, writer io.Writer) error + Unmarshal func(data []byte) (interface{}, error) + type CommandSwitchAccountFactory struct + func (this *CommandSwitchAccountFactory) Marshal(command interface{}, writer io.Writer) error + func (this *CommandSwitchAccountFactory) Unmarshal(data []byte) (interface{}, error) + type ServerSession struct + func NewServerSession(validator protocol.UserValidator) *ServerSession + func (this *ServerSession) DecodeRequestBody(reader io.Reader) io.Reader + func (this *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.RequestHeader, error) + func (this *ServerSession) EncodeResponseBody(writer io.Writer) io.Writer + func (this *ServerSession) EncodeResponseHeader(header *protocol.ResponseHeader, writer io.Writer) + func (this *ServerSession) Release() Incompatible versions in this module v4.15.0+incompatible Feb 7, 2019 v3.50.2+incompatible Oct 29, 2018