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.

27 lines
804 B

4 years ago
4 years ago
4 years ago
  1. // Package ziface 主要提供zinx全部抽象层接口定义.
  2. // 包括:
  3. // IServer 服务mod接口
  4. // IRouter 路由mod接口
  5. // IConnection 连接mod层接口
  6. // IMessage 消息mod接口
  7. // IDataPack 消息拆解接口
  8. // IMsgHandler 消息处理及协程池接口
  9. //
  10. // 当前文件描述:
  11. // @Title imessage.go
  12. // @Description 提供消息的基本方法
  13. // @Author Aceld - Thu Mar 11 10:32:29 CST 2019
  14. package ziface
  15. /*
  16. 将请求的一个消息封装到message中定义抽象层接口
  17. */
  18. type IMessage interface {
  19. GetDataLen() uint32 //获取消息数据段长度
  20. GetMsgID() uint32 //获取消息ID
  21. GetData() []byte //获取消息内容
  22. SetMsgID(uint32) //设计消息ID
  23. SetData([]byte) //设计消息内容
  24. SetDataLen(uint32) //设置消息数据段长度
  25. }