Documentation ¶
Index ¶
- Constants
- Variables
- func Authenticate(b []byte) uint32
- func MarshalCommand(command interface{}, writer io.Writer) error
- func UnmarshalCommand(cmdId byte, data []byte) (protocol.ResponseCommand, error)
- type 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
- type CommandSwitchAccountFactory
- type 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)
Constants ¶
Variables ¶
Functions ¶
Types ¶
type ClientSession ¶
type ClientSession struct {
// contains filtered or unexported fields
}
func NewClientSession ¶
func NewClientSession(idHash protocol.IDHash) *ClientSession
func (*ClientSession) DecodeResponseBody ¶
func (this *ClientSession) DecodeResponseBody(reader io.Reader) io.Reader
func (*ClientSession) DecodeResponseHeader ¶
func (this *ClientSession) DecodeResponseHeader(reader io.Reader) (*protocol.ResponseHeader, error)
func (*ClientSession) EncodeRequestBody ¶
func (this *ClientSession) EncodeRequestBody(writer io.Writer) io.Writer
func (*ClientSession) EncodeRequestHeader ¶
func (this *ClientSession) EncodeRequestHeader(header *protocol.RequestHeader, writer io.Writer)
type CommandFactory ¶
type CommandSwitchAccountFactory ¶
type CommandSwitchAccountFactory struct { }
func (*CommandSwitchAccountFactory) Marshal ¶
func (this *CommandSwitchAccountFactory) Marshal(command interface{}, writer io.Writer) error
func (*CommandSwitchAccountFactory) Unmarshal ¶
func (this *CommandSwitchAccountFactory) Unmarshal(data []byte) (interface{}, error)
type ServerSession ¶
type ServerSession struct {
// contains filtered or unexported fields
}
func NewServerSession ¶
func NewServerSession(validator protocol.UserValidator) *ServerSession
func (*ServerSession) DecodeRequestBody ¶
func (this *ServerSession) DecodeRequestBody(reader io.Reader) io.Reader
func (*ServerSession) DecodeRequestHeader ¶
func (this *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.RequestHeader, error)
func (*ServerSession) EncodeResponseBody ¶
func (this *ServerSession) EncodeResponseBody(writer io.Writer) io.Writer
func (*ServerSession) EncodeResponseHeader ¶
func (this *ServerSession) EncodeResponseHeader(header *protocol.ResponseHeader, writer io.Writer)
Click to show internal directories.
Click to hide internal directories.