You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
483 B

  1. package znet
  2. import "github.com/aceld/zinx/ziface"
  3. type Request struct {
  4. conn ziface.IConnection //已经和客户端建立好的 链接
  5. msg ziface.IMessage //客户端请求的数据
  6. }
  7. //获取请求连接信息
  8. func (r *Request) GetConnection() ziface.IConnection {
  9. return r.conn
  10. }
  11. //获取请求消息的数据
  12. func (r *Request) GetData() []byte {
  13. return r.msg.GetData()
  14. }
  15. //获取请求的消息的ID
  16. func (r *Request) GetMsgID() uint32 {
  17. return r.msg.GetMsgId()
  18. }