Documentation ¶ Index ¶ Constants func BrodcastMsgProtobuf(conn net.Conn, eMsg pb.EMSG, body proto.Message) (err error) func NewMsgProtobuf(eMsg pb.EMSG, body proto.Message) (buffer *bytes.Buffer, err error) type Packet func NewPacket(data []byte) (*Packet, error) func (p *Packet) ReadProtoMsg(body proto.Message) error Constants ¶ View Source const ( ProtoMask uint32 = 0x80000000 EMsgMask = ^ProtoMask ) Variables ¶ This section is empty. Functions ¶ func BrodcastMsgProtobuf ¶ func BrodcastMsgProtobuf(conn net.Conn, eMsg pb.EMSG, body proto.Message) (err error) func NewMsgProtobuf ¶ func NewMsgProtobuf(eMsg pb.EMSG, body proto.Message) (buffer *bytes.Buffer, err error) Types ¶ type Packet ¶ type Packet struct { EMsg pb.EMSG IsProto bool Data []byte } Represents an incoming, partially unread message. func NewPacket ¶ func NewPacket(data []byte) (*Packet, error) func (*Packet) ReadProtoMsg ¶ func (p *Packet) ReadProtoMsg(body proto.Message) error Source Files ¶ View all Source files msg.go packet.go Click to show internal directories. Click to hide internal directories.