Exemplo n.º 1
0
func (this *LoginRoleEntity) EncodeEntity(buf *iobuffer.OutBuffer) *iobuffer.OutBuffer {
	buf.PutRawValue(this.UserID)
	buf.PutRawValue(this.RoleID)
	buf.PutRawValue(this.OldServerId)
	buf.PutRawValue(this.RoleName)
	buf.PutRawValue(this.Level)
	buf.PutRawValue(this.RoleJob)
	buf.PutRawValue(this.RoleIcon)
	buf.PutRawValue(this.IsPayRole)
	buf.PutRawValue(this.LastLoginTime)
	return buf
}
Exemplo n.º 2
0
func (h *Header) Encode(writeBuf *iobuffer.OutBuffer) *iobuffer.OutBuffer {
	if writeBuf == nil {
		writeBuf = iobuffer.NewOutBuffer(1024)
	}
	writeBuf.PutUint16(h.PackLen)
	writeBuf.PutUint16(h.CmdID)
	writeBuf.PutUint32(h.ID)
	writeBuf.PutUint16(h.FSID)
	writeBuf.PutUint16(h.TSID)
	writeBuf.PutUint16(h.ValidCode)
	writeBuf.PutUint8(h.Version)
	writeBuf.PutUint8(h.ClientSrc)
	writeBuf.PutUint16(h.ErrCode)
	return writeBuf
}
Exemplo n.º 3
0
func (this *Entity) EncodeEntity(writeBuf *iobuffer.OutBuffer) *iobuffer.OutBuffer {
	writeBuf.PutRawValue(this.a)
	writeBuf.PutRawValue(this.b)
	return writeBuf
}