Registry / networking / plgd-dev-go-coap-v2

plgd-dev-go-coap-v2

JSON →
library2.6.0gogounverified

A CoAP (Constrained Application Protocol) client and server implementation in Go.

go get github.com/plgd-dev/go-coap/v2
INSTALL
IMPORT
SIG · PLGD-DEV-GO-COAP-V
P
plgd-dev-go-coap-v2
networkinggov2.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

coap
github.com/plgd-dev/go-coap/v2

Send a CoAP GET request over UDP.

package main import ( "context" "fmt" "github.com/plgd-dev/go-coap/v2/message" "github.com/plgd-dev/go-coap/v2/udp" ) func main() { conn, _ := udp.Dial("localhost:5683") resp, _ := conn.Get(context.Background(), "/resource") fmt.Println(resp.Code()) }
Debug
Known issues
breakingThe v2 API differs significantly from v1; ensure you import the correct version.
fix
Use import path github.com/plgd-dev/go-coap/v2 for v2.
affects: >=2.0.0
Upgrade
Version history
2.6.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
plgd-dev-go-coap-v2 — go get plgd-dev-go-coap-v2 · libregistry