CoAP over Yggdrasil for Go.
Add syntax highlighting to code snippets in README
CI: separate fetch and build jobs
Add go module definition


browse  log 



You can also use your local clone with git send-email.


builds.sr.ht status

This project is a fork of github.com/go-ocf/go-coap, adding Yggdrasil support to the library.

This project lives at git.sr.ht/~fnux/yggdrasil-go-coap, a bug tracker being available at todo.sr.ht/~fnux/yggdrasil-go-coap.


You can send me patches by email. Feel free to contact me directly if you have issues with this workflow.

#Yggdrasil support

In order to support Yggdrasil, the following structure and methods are provided:

type YggdrasilNode struct {
	Core   *yggdrasil.Core
	Config *config.NodeConfig

func DialYggdrasil(node coapNet.YggdrasilNode, address string) (*ClientConn, error)
func ListenAndServeYggdrasil(node coapNet.YggdrasilNode, handler Handler) error

A complete example can be found on git.sr.ht/~fnux/yggdrasil-coap-nodes.

#Custom CoAP Options

This fork also allow to use custom CoAP options:

func SetOptionDef(oid OptionID, format string, minLen int, maxLen int)

// Example
var MyCustomCoAPOptionID coap.OptionID = 65000
coap.SetOptionDef(MyCustomCoAPOptionID, "string", 0, 255)

params := coap.MessageParams{ ... }
msg := c.NewMessage(params)

msg.SetOption(MyCustomCoAPOption, "spouik")