dtls/

directory
v3.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: Apache-2.0

README

DTLS Examples

This directory contains examples of how to use go-coap with DTLS.

PKI

The pki example demonstrates how to use DTLS with Public Key Infrastructure (PKI). The client and server generate their own certificates and use them to authenticate each other.

To run the example:

# run the server
go run examples/dtls/pki/server/main.go
# run the client
go run examples/dtls/pki/client/main.go

PSK

The psk example demonstrates how to use DTLS with a Pre-Shared Key (PSK). The client and server use a pre-shared key to authenticate each other.

To run the example:

# run the server
go run examples/dtls/psk/server/main.go
# run the client
go run examples/dtls/psk/client/main.go

CID

The cid example demonstrates how to use DTLS with Connection ID (CID). The client and server use a connection ID to identify the connection, which allows the connection to be resumed on a different address.

To run the example:

# run the server
go run examples/dtls/cid/server/main.go
# run the client
go run examples/dtls/cid/client/main.go

Directories

Path Synopsis
cid
client command
server command
pki
client command
server command
psk
client command
server command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL