Invocation.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #if !BESTHTTP_DISABLE_SIGNALR_CORE
  2. using System;
  3. namespace BestHTTP.SignalRCore.Messages
  4. {
  5. public struct Completion
  6. {
  7. public MessageTypes type;
  8. public string invocationId;
  9. }
  10. public struct CompletionWithResult
  11. {
  12. public MessageTypes type;
  13. public string invocationId;
  14. public object result;
  15. }
  16. public struct CompletionWithError
  17. {
  18. public MessageTypes type;
  19. public string invocationId;
  20. public string error;
  21. }
  22. public struct StreamItemMessage
  23. {
  24. public MessageTypes type;
  25. public string invocationId;
  26. public object item;
  27. }
  28. public struct InvocationMessage
  29. {
  30. public MessageTypes type;
  31. public string invocationId;
  32. public bool nonblocking;
  33. public string target;
  34. public object[] arguments;
  35. }
  36. public struct UploadInvocationMessage
  37. {
  38. public MessageTypes type;
  39. public string invocationId;
  40. public bool nonblocking;
  41. public string target;
  42. public object[] arguments;
  43. public string[] streamIds;
  44. }
  45. public struct CancelInvocationMessage
  46. {
  47. public MessageTypes type { get { return MessageTypes.CancelInvocation; } }
  48. public string invocationId;
  49. }
  50. public struct PingMessage
  51. {
  52. public MessageTypes type { get { return MessageTypes.Ping; } }
  53. }
  54. public struct CloseMessage
  55. {
  56. public MessageTypes type { get { return MessageTypes.Close; } }
  57. }
  58. public struct CloseWithErrorMessage
  59. {
  60. public MessageTypes type { get { return MessageTypes.Close; } }
  61. public string error;
  62. }
  63. }
  64. #endif