util

package
v0.0.0-...-18f3c65 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBranch

func GenerateBranch() string

Generate a SIP 2.0 Via branch ID. This is probably not suitable for use by stateless proxies.

func GenerateCSeq

func GenerateCSeq() int

Generate a secure random number between 0 and 50,000.

func GenerateCallID

func GenerateCallID() string

Generate a secure UUID4, e.g.f47ac10b-58cc-4372-a567-0e02b2c3d479

func GenerateOriginID

func GenerateOriginID() string

Generate a random ID for an SDP.

func GenerateTag

func GenerateTag() string

Generate a 48-bit secure random string like: 27c97271d363.

func IsIPv6

func IsIPv6(ip string) bool

Return true if IP contains a colon.

func IsRefused

func IsRefused(err error) bool

Return true if error is ICMP connection refused.

func IsUseOfClosed

func IsUseOfClosed(err error) bool

Return true if error was caused by reading from a closed socket.

func Portstr

func Portstr(port uint16) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL