Versions in this module Expand all Collapse all v2 v2.6.0 Jul 29, 2022 v2.0.0 Aug 1, 2022 Changes in this version + func Client(conn *dtls.Conn, opts ...DialOption) *client.ClientConn + func Dial(target string, dtlsCfg *dtls.Config, opts ...DialOption) (*client.ClientConn, error) + type BlockwiseFactoryFunc = func(getSentRequest func(token message.Token) (blockwise.Message, bool)) *blockwise.BlockWise + type BlockwiseOpt struct + func WithBlockwise(enable bool, szx blockwise.SZX, transferTimeout time.Duration) BlockwiseOpt + type CloseSocketOpt struct + func WithCloseSocket() CloseSocketOpt + type ContextOpt struct + func WithContext(ctx context.Context) ContextOpt + type DialOption interface + type DialerOpt struct + func WithDialer(dialer *net.Dialer) DialerOpt + type ErrorFunc = func(error) + type ErrorsOpt struct + func WithErrors(errors ErrorFunc) ErrorsOpt + type EventFunc = func() + type GetMIDFunc = func() uint16 + type GoPoolFunc = func(func()) error + type GoPoolOpt struct + func WithGoPool(goPool GoPoolFunc) GoPoolOpt + type HandlerFunc = func(*client.ResponseWriter, *pool.Message) + type HandlerFuncOpt struct + func WithHandlerFunc(h HandlerFunc) HandlerFuncOpt + func WithMux(m mux.Handler) HandlerFuncOpt + type InactivityMonitorOpt struct + func WithInactivityMonitor(duration time.Duration, onInactive inactivity.OnInactiveFunc) InactivityMonitorOpt + type KeepAliveOpt struct + func WithKeepAlive(maxRetries uint32, timeout time.Duration, onInactive inactivity.OnInactiveFunc) KeepAliveOpt + type Listener interface + AcceptWithContext func(ctx context.Context) (net.Conn, error) + Close func() error + type MaxMessageSizeOpt struct + func WithMaxMessageSize(maxMessageSize uint32) MaxMessageSizeOpt + type MessagePoolOpt struct + func WithMessagePool(messagePool *pool.Pool) MessagePoolOpt + type NetOpt struct + func WithNetwork(net string) NetOpt + type OnNewClientConnFunc = func(cc *client.ClientConn, dtlsConn *dtls.Conn) + type OnNewClientConnOpt struct + func WithOnNewClientConn(onNewClientConn OnNewClientConnFunc) OnNewClientConnOpt + type PeriodicRunnerOpt struct + func WithPeriodicRunner(periodicRunner periodic.Func) PeriodicRunnerOpt + type Server struct + func NewServer(opt ...ServerOption) *Server + func (s *Server) Serve(l Listener) error + func (s *Server) Stop() + type ServerOption interface + type Session struct + func NewSession(ctx context.Context, connection *coapNet.Conn, maxMessageSize uint32, ...) *Session + func (s *Session) AddOnClose(f EventFunc) + func (s *Session) Close() error + func (s *Session) Context() context.Context + func (s *Session) Done() <-chan struct{} + func (s *Session) LocalAddr() net.Addr + func (s *Session) MaxMessageSize() uint32 + func (s *Session) RemoteAddr() net.Addr + func (s *Session) Run(cc *client.ClientConn) (err error) + func (s *Session) SetContextValue(key interface{}, val interface{}) + func (s *Session) WriteMessage(req *pool.Message) error + func (s *Session) WriteMulticastMessage(req *pool.Message, address *net.UDPAddr, opts ...coapNet.MulticastOption) error + type TransmissionOpt struct + func WithTransmission(transmissionNStart time.Duration, transmissionAcknowledgeTimeout time.Duration, ...) TransmissionOpt