SignalingMessage.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. using System;
  2. namespace Unity.RenderStreaming
  3. {
  4. #pragma warning disable 0649
  5. [Serializable]
  6. public class DescData
  7. {
  8. public string connectionId;
  9. public string sdp;
  10. public string type;
  11. public bool polite;
  12. }
  13. [Serializable]
  14. public class CandidateData
  15. {
  16. public string connectionId;
  17. public string candidate;
  18. public string sdpMid;
  19. public int sdpMLineIndex;
  20. }
  21. [Serializable]
  22. class SignalingMessage
  23. {
  24. public string status;
  25. public string message;
  26. public string sessionId;
  27. public string connectionId;
  28. public bool polite;
  29. public string sdp;
  30. public string type;
  31. public string candidate;
  32. public string sdpMid;
  33. public int sdpMLineIndex;
  34. }
  35. [Serializable]
  36. class RoutedMessage<T>
  37. {
  38. public string from;
  39. public string to;
  40. public string type;
  41. public T data;
  42. }
  43. [Serializable]
  44. class OpenSessionData
  45. {
  46. public string sessionId;
  47. }
  48. [Serializable]
  49. class CreateConnectionResData
  50. {
  51. public string connectionId;
  52. public bool polite;
  53. }
  54. [Serializable]
  55. class DestroyConnectionResData
  56. {
  57. public string connectionId;
  58. }
  59. [Serializable]
  60. class ConnectionResDataList
  61. {
  62. public DescData[] connections;
  63. }
  64. [Serializable]
  65. class OfferResDataList
  66. {
  67. public DescData[] offers;
  68. }
  69. [Serializable]
  70. class AnswerResDataList
  71. {
  72. public DescData[] answers;
  73. }
  74. [Serializable]
  75. class CandidateContainerResDataList
  76. {
  77. public CandidateContainerResData[] candidates;
  78. }
  79. [Serializable]
  80. class CandidateContainerResData
  81. {
  82. public string connectionId;
  83. public CandidateData[] candidates;
  84. }
  85. [Serializable]
  86. class AllResData
  87. {
  88. public SignalingMessage[] messages;
  89. }
  90. #pragma warning restore 0649
  91. }