package dtls
import "github.com/plgd-dev/go-coap/v3/dtls"
Index ¶
- Variables
- func Client(conn *dtls.Conn, opts ...udp.Option) *udpClient.Conn
- func Dial(target string, dtlsCfg *dtls.Config, opts ...udp.Option) (*udpClient.Conn, error)
- func NewServer(opt ...server.Option) *server.Server
Variables ¶
var DefaultConfig = func() udpClient.Config { cfg := udpClient.DefaultConfig cfg.Handler = func(w *responsewriter.ResponseWriter[*udpClient.Conn], r *pool.Message) { switch r.Code() { case codes.POST, codes.PUT, codes.GET, codes.DELETE: if err := w.SetResponse(codes.NotFound, message.TextPlain, nil); err != nil { cfg.Errors(fmt.Errorf("dtls client: cannot set response: %w", err)) } } } return cfg }()
Functions ¶
func Client ¶
Client creates client over dtls connection.
func Dial ¶
Dial creates a client connection to the given target.
func NewServer ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
dtls/server |
- Version
- v3.3.6 (latest)
- Published
- Sep 18, 2024
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 1 week ago –
Tools for package owners.