INetModule.cs 733 B

123456789101112131415161718192021222324252627
  1. namespace XGame.Framework.Network
  2. {
  3. public interface INetModule
  4. {
  5. void SetEncryptKey(string key);
  6. /// <summary>
  7. /// 连接
  8. /// </summary>
  9. /// <param name="ip"></param>
  10. /// <param name="port"></param>
  11. void Connect(AddressInfo address);
  12. /// <summary>
  13. /// 断开连接
  14. /// </summary>
  15. void Disconnect();
  16. void Reconnect();
  17. /// <summary>
  18. /// 发送消息
  19. /// </summary>
  20. /// <param name="msg"></param>
  21. /// <param name="isFilter">过滤参数,默认开启</param>
  22. void Send(IMsgRequest msg, bool isFilter = true);
  23. void StartHeartbeat();
  24. void StopHeartbeat();
  25. }
  26. }