Versions in this module Expand all Collapse all v1 v1.9.1 Feb 28, 2016 Changes in this version + const AddrTypeDomain + const AddrTypeIPv4 + const AddrTypeIPv6 + const Version + var ErrorCommandTooLarge = errors.New("Command too large.") + var ErrorCommandTypeMismatch = errors.New("Command type mismatch.") + var ErrorUnknownCommand = 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)