SessionEventArgs.cs 820 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Net.Sockets;
  2. namespace XGame.Framework.Network
  3. {
  4. public struct SessionEventArgs
  5. {
  6. public ESessionCode code;
  7. public bool isSocketError;
  8. public SocketError socketError;
  9. /// <summary>
  10. /// Webgl²ÅÓÐ
  11. /// </summary>
  12. public int websocketCode;
  13. public string errorMsg;
  14. }
  15. public struct RequestEventArgs
  16. {
  17. public int seqId;
  18. public int protoId;
  19. public bool isFilter;
  20. public ESessionCode code;
  21. }
  22. public struct ResponseEventArgs
  23. {
  24. public long errorCode;
  25. public string info;
  26. public int seqId;
  27. public int protoId;
  28. public override string ToString()
  29. {
  30. return $"<Id:{protoId} seq:{seqId} code:{errorCode} info:{info}>";
  31. }
  32. }
  33. }