Documentation ¶
Index ¶
- Variables
- func Client(conn net.Conn, config *Config) (net.Conn, error)
- func ClientWithContext(ctx context.Context, conn net.Conn, config *Config) (net.Conn, error)
- func Dial(remoteAddr *net.UDPAddr, config *Config) (net.Conn, error)
- func DialWithContext(ctx context.Context, remoteAddr *net.UDPAddr, config *Config) (net.Conn, error)
- func Server(conn net.Conn, config *Config) (net.Conn, error)
- func ServerWithContext(ctx context.Context, conn net.Conn, config *Config) (net.Conn, error)
- type Config
- type Listener
- type Not1Reader
- type SCTPConn
- func (s *SCTPConn) Close() error
- func (s *SCTPConn) LocalAddr() net.Addr
- func (s *SCTPConn) Read(b []byte) (int, error)
- func (s *SCTPConn) RemoteAddr() net.Addr
- func (s *SCTPConn) SetDeadline(t time.Time) error
- func (s *SCTPConn) SetReadDeadline(t time.Time) error
- func (s *SCTPConn) SetWriteDeadline(t time.Time) error
- func (s *SCTPConn) Write(b []byte) (int, error)
- type SCTPType
Constants ¶
This section is empty.
Variables ¶
var ErrInsufficientBuffer = errors.New("buffer too small to hold the received data")
Functions ¶
func ClientWithContext ¶
DialWithContext creates a DTLS connection to the given network address using the given shared secret
func Dial ¶
Dial creates a DTLS connection to the given network address using the given shared secret
func DialWithContext ¶
func DialWithContext(ctx context.Context, remoteAddr *net.UDPAddr, config *Config) (net.Conn, error)
DialWithContext like Dial, but includes context for cancellation and timeouts.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener represents a DTLS Listener
func NewListener ¶
NewListener creates a DTLS listener which accepts connections from an inner Listener.
func (*Listener) AcceptWithContext ¶
AcceptWithContext accepts a connection with shared secret, with a context
type Not1Reader ¶
type Not1Reader struct {
// contains filtered or unexported fields
}
type SCTPConn ¶
type SCTPConn struct {
// contains filtered or unexported fields
}
SCTPConn implements the net.Conn interface using sctp stream and DTLS conn
SCTPConn buffers incoming SCTP messages, allowing the caller to use SCTPConn as a TCP-like bytes stream net.Conn, with reads smaller than individual message sizes.