Versions in this module Expand all Collapse all v0 v0.1.1 Jul 2, 2020 v0.1.0 Jul 2, 2020 Changes in this version + var ErrConnClosed = errors.New("dtls: conn is closed") + func Fingerprint(cert *x509.Certificate, algo HashAlgorithm) (string, error) + func GenerateSelfSigned() (*x509.Certificate, crypto.PrivateKey, error) + type CipherSuiteID uint16 + const TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + const TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + const TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + const TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + type ClientAuthType int + const NoClientCert + const RequestClientCert + const RequireAnyClientCert + type Config struct + Certificate *x509.Certificate + CipherSuites []CipherSuiteID + ClientAuth ClientAuthType + FlightInterval time.Duration + LoggerFactory logging.LoggerFactory + PSK PSKCallback + PSKIdentityHint []byte + PrivateKey crypto.PrivateKey + SRTPProtectionProfiles []SRTPProtectionProfile + type Conn struct + func Client(conn net.Conn, config *Config) (*Conn, error) + func Dial(network string, raddr *net.UDPAddr, config *Config) (*Conn, error) + func Resume(state *State, conn net.Conn, config *Config) (*Conn, error) + func Server(conn net.Conn, config *Config) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) Export() (*State, net.Conn, error) + func (c *Conn) ExportKeyingMaterial(label string, context []byte, length int) ([]byte, error) + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) Read(p []byte) (n int, err error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) RemoteCertificate() *x509.Certificate + func (c *Conn) SelectedSRTPProtectionProfile() (SRTPProtectionProfile, bool) + func (c *Conn) SetDeadline(t time.Time) error + func (c *Conn) SetReadDeadline(t time.Time) error + func (c *Conn) SetWriteDeadline(t time.Time) error + func (c *Conn) Write(p []byte) (int, error) + type HashAlgorithm uint16 + const HashAlgorithmMD5 + const HashAlgorithmSHA1 + const HashAlgorithmSHA224 + const HashAlgorithmSHA256 + const HashAlgorithmSHA384 + const HashAlgorithmSHA512 + func HashAlgorithmString(s string) (HashAlgorithm, error) + func (h HashAlgorithm) String() string + type Listener struct + func Listen(network string, laddr *net.UDPAddr, config *Config) (*Listener, error) + func (l *Listener) Accept() (net.Conn, error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + type PSKCallback func([]byte) ([]byte, error) + type SRTPProtectionProfile uint16 + const SRTP_AES128_CM_HMAC_SHA1_80 + type State struct + func (s *State) MarshalBinary() ([]byte, error) + func (s *State) UnmarshalBinary(data []byte) error