Documentation ¶
Index ¶
Constants ¶
View Source
const MagicNumber = 0x3bef5c
Variables ¶
View Source
var NewCodecFuncMap map[Type]NewCodecFunc
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { io.Closer ReadHeader(*Header) error ReadBody(any) error Write(*Header, any) error }
func NewGobCodec ¶
func NewGobCodec(conn io.ReadWriteCloser) Codec
func NewJsonCodec ¶
func NewJsonCodec(conn io.ReadWriteCloser) Codec
type GobCodec ¶
type GobCodec struct {
// contains filtered or unexported fields
}
func (*GobCodec) ReadHeader ¶
type JsonCodec ¶
type JsonCodec struct {
// contains filtered or unexported fields
}
func (*JsonCodec) ReadHeader ¶
type NewCodecFunc ¶
type NewCodecFunc func(closer io.ReadWriteCloser) Codec
Click to show internal directories.
Click to hide internal directories.