Error.cs 525 B

1234567891011121314151617181920212223
  1. #if !BESTHTTP_DISABLE_SOCKETIO
  2. namespace BestHTTP.SocketIO
  3. {
  4. public sealed class Error
  5. {
  6. public SocketIOErrors Code { get; private set; }
  7. public string Message { get; private set; }
  8. public Error(SocketIOErrors code, string msg)
  9. {
  10. this.Code = code;
  11. this.Message = msg;
  12. }
  13. public override string ToString()
  14. {
  15. return string.Format("Code: {0} Message: \"{1}\"", this.Code.ToString(), this.Message);
  16. }
  17. }
  18. }
  19. #endif