url.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
  2. // SPDX-License-Identifier: MIT
  3. package ice
  4. import "github.com/pion/stun"
  5. type (
  6. // URL represents a STUN (rfc7064) or TURN (rfc7065) URI
  7. //
  8. // Deprecated: Please use pion/stun.URI
  9. URL = stun.URI
  10. // ProtoType indicates the transport protocol type that is used in the ice.URL
  11. // structure.
  12. //
  13. // Deprecated: TPlease use pion/stun.ProtoType
  14. ProtoType = stun.ProtoType
  15. // SchemeType indicates the type of server used in the ice.URL structure.
  16. //
  17. // Deprecated: Please use pion/stun.SchemeType
  18. SchemeType = stun.SchemeType
  19. )
  20. const (
  21. // SchemeTypeSTUN indicates the URL represents a STUN server.
  22. //
  23. // Deprecated: Please use pion/stun.SchemeTypeSTUN
  24. SchemeTypeSTUN = stun.SchemeTypeSTUN
  25. // SchemeTypeSTUNS indicates the URL represents a STUNS (secure) server.
  26. //
  27. // Deprecated: Please use pion/stun.SchemeTypeSTUNS
  28. SchemeTypeSTUNS = stun.SchemeTypeSTUNS
  29. // SchemeTypeTURN indicates the URL represents a TURN server.
  30. //
  31. // Deprecated: Please use pion/stun.SchemeTypeTURN
  32. SchemeTypeTURN = stun.SchemeTypeTURN
  33. // SchemeTypeTURNS indicates the URL represents a TURNS (secure) server.
  34. //
  35. // Deprecated: Please use pion/stun.SchemeTypeTURNS
  36. SchemeTypeTURNS = stun.SchemeTypeTURNS
  37. )
  38. const (
  39. // ProtoTypeUDP indicates the URL uses a UDP transport.
  40. //
  41. // Deprecated: Please use pion/stun.ProtoTypeUDP
  42. ProtoTypeUDP = stun.ProtoTypeUDP
  43. // ProtoTypeTCP indicates the URL uses a TCP transport.
  44. //
  45. // Deprecated: Please use pion/stun.ProtoTypeTCP
  46. ProtoTypeTCP = stun.ProtoTypeTCP
  47. )
  48. // Unknown represents and unknown ProtoType or SchemeType
  49. //
  50. // Deprecated: Please use pion/stun.SchemeTypeUnknown or pion/stun.ProtoTypeUnknown
  51. const Unknown = 0
  52. // ParseURL parses a STUN or TURN urls following the ABNF syntax described in
  53. // https://tools.ietf.org/html/rfc7064 and https://tools.ietf.org/html/rfc7065
  54. // respectively.
  55. //
  56. // Deprecated: Please use pion/stun.ParseURI
  57. var ParseURL = stun.ParseURI //nolint:gochecknoglobals
  58. // NewSchemeType defines a procedure for creating a new SchemeType from a raw
  59. // string naming the scheme type.
  60. //
  61. // Deprecated: Please use pion/stun.NewSchemeType
  62. var NewSchemeType = stun.NewSchemeType //nolint:gochecknoglobals
  63. // NewProtoType defines a procedure for creating a new ProtoType from a raw
  64. // string naming the transport protocol type.
  65. //
  66. // Deprecated: Please use pion/stun.NewProtoType
  67. var NewProtoType = stun.NewProtoType //nolint:gochecknoglobals