Documentation
¶
Index ¶
- func DeserializeSessionDescription(msg string) (*webrtc.SessionDescription, error)
- func GetCandidateAddrs(sdpStr string) []net.IP
- func GetClientIp(req *http.Request) string
- func IsLocal(ip net.IP) bool
- func SerializeSessionDescription(desc *webrtc.SessionDescription) (string, error)
- func StripLocalAddresses(str string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeSessionDescription ¶
func GetCandidateAddrs ¶ added in v2.9.2
Returns a list of IP addresses of ICE candidates, roughly in descending order for accuracy for geolocation
func GetClientIp ¶ added in v2.9.2
Attempts to retrieve the client IP of where the HTTP request originating. There is no standard way to do this since the original client IP can be included in a number of different headers, depending on the proxies and load balancers between the client and the server. We attempt to check as many of these headers as possible to determine a "best guess" of the client IP Using this as a reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded
func SerializeSessionDescription ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.