Documentation ¶
Index ¶
Constants ¶
View Source
const LengthSize = 2
Variables ¶
This section is empty.
Functions ¶
func NewMessageCallback ¶
func NewMessageCallback(f SessionMessageFunc) cellnet.EventFunc
func SendVariableLengthPacket ¶
func SendVariableLengthPacket(outputStream io.Writer, pktWriter PacketWriter) error
发送变长封包
Types ¶
type PacketReader ¶
type PacketReader struct {
// contains filtered or unexported fields
}
func RecvVariableLengthPacket ¶
func RecvVariableLengthPacket(inputStream io.Reader) (pktReader PacketReader, err error)
接收变长封包
func (*PacketReader) Raw ¶
func (p *PacketReader) Raw() []byte
type PacketWriter ¶
type PacketWriter struct {
// contains filtered or unexported fields
}
封包写入
func (*PacketWriter) WriteString ¶
func (p *PacketWriter) WriteString(v string) error
type SessionMessageFunc ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.