Versions in this module Expand all Collapse all v2 v2.0.12 Sep 18, 2021 v2.0.11 Sep 18, 2021 Changes in this version + const VersionDTLS12 + var ErrConnClosed = &FatalError + func CipherSuiteName(id CipherSuiteID) string + func CipherSuites() []*tls.CipherSuite + func InsecureCipherSuites() []*tls.CipherSuite + func Listen(network string, laddr *net.UDPAddr, config *Config) (net.Listener, error) + func NewListener(inner net.Listener, config *Config) (net.Listener, error) + type CipherSuite interface + AuthenticationType func() CipherSuiteAuthenticationType + CertificateType func() clientcertificate.Type + Decrypt func(in []byte) ([]byte, error) + Encrypt func(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) + HashFunc func() func() hash.Hash + ID func() CipherSuiteID + Init func(masterSecret, clientRandom, serverRandom []byte, isClient bool) error + IsInitialized func() bool + String func() string + type CipherSuiteAuthenticationType = ciphersuite.AuthenticationType + const CipherSuiteAuthenticationTypeAnonymous + const CipherSuiteAuthenticationTypeCertificate + const CipherSuiteAuthenticationTypePreSharedKey + type CipherSuiteID = ciphersuite.ID + const TLS_ECDHE_ECDSA_WITH_AES_128_CCM + const TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 + 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 + const TLS_PSK_WITH_AES_128_CBC_SHA256 + const TLS_PSK_WITH_AES_128_CCM + const TLS_PSK_WITH_AES_128_CCM_8 + const TLS_PSK_WITH_AES_128_GCM_SHA256 + type ClientAuthType int + const NoClientCert + const RequestClientCert + const RequireAndVerifyClientCert + const RequireAnyClientCert + const VerifyClientCertIfGiven + type Config struct + Certificates []tls.Certificate + CipherSuites []CipherSuiteID + CiscoCompat PSKCallback + ClientAuth ClientAuthType + ClientCAs *x509.CertPool + ConnectContextMaker func() (context.Context, func()) + CustomCipherSuites func() []CipherSuite + ExtendedMasterSecret ExtendedMasterSecretType + FlightInterval time.Duration + InsecureHashes bool + InsecureSkipVerify bool + KeyLogWriter io.Writer + LoggerFactory logging.LoggerFactory + MTU int + PSK PSKCallback + PSKIdentityHint []byte + ReplayProtectionWindow int + RootCAs *x509.CertPool + SRTPProtectionProfiles []SRTPProtectionProfile + ServerName string + SignatureSchemes []tls.SignatureScheme + VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error + type Conn struct + func Client(conn net.Conn, config *Config) (*Conn, error) + func ClientWithContext(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) + func Dial(network string, raddr *net.UDPAddr, config *Config) (*Conn, error) + func DialWithContext(ctx context.Context, 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 ServerWithContext(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) ConnectionState() State + 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) 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 ExtendedMasterSecretType int + const DisableExtendedMasterSecret + const RequestExtendedMasterSecret + const RequireExtendedMasterSecret + type FatalError = protocol.FatalError + type HandshakeError = protocol.HandshakeError + type InternalError = protocol.InternalError + type PSKCallback func([]byte) ([]byte, error) + type SRTPProtectionProfile = extension.SRTPProtectionProfile + const SRTP_AEAD_AES_128_GCM + const SRTP_AEAD_AES_256_GCM + const SRTP_AES128_CM_HMAC_SHA1_32 + const SRTP_AES128_CM_HMAC_SHA1_80 + type State struct + IdentityHint []byte + PeerCertificates [][]byte + SessionID []byte + func (s *State) ExportKeyingMaterial(label string, context []byte, length int) ([]byte, error) + func (s *State) MarshalBinary() ([]byte, error) + func (s *State) UnmarshalBinary(data []byte) error + type TemporaryError = protocol.TemporaryError + type TimeoutError = protocol.TimeoutError Other modules containing this package github.com/yyxhgy/dtls