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.

24 lines
531 B

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