Documentation
¶
Overview ¶
Package coap provides a CoAP client and server.
Index ¶
- func ListenAndServe(network string, addr string, handler mux.Handler) (err error)
- func ListenAndServeDTLS[T net.DTLSServerConfig](network string, addr string, cfg T, handler mux.Handler) (err error)
- func ListenAndServeDTLSWithOptions[T net.DTLSServerConfig](network string, addr string, cfg T, opts ...dtlsServer.Option) (err error)
- func ListenAndServeTCPTLS(network, addr string, config *tls.Config, handler mux.Handler) (err error)
- func ListenAndServeTCPTLSWithOptions(network, addr string, config *tls.Config, opts ...tcpServer.Option) (err error)
- func ListenAndServeWithOptions(network, addr string, opts ...any) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
ListenAndServe Starts a server on address and network specified Invoke handler for incoming queries.
func ListenAndServeDTLS ¶
func ListenAndServeDTLS[T net.DTLSServerConfig](network string, addr string, cfg T, handler mux.Handler) (err error)
ListenAndServeDTLS starts a server on address and network over DTLS. cfg accepts either a *piondtls.Config (backward-compatible legacy path) or a net.DTLSServerOptions value built with net.NewDTLSServerOptions (recommended).
func ListenAndServeDTLSWithOptions ¶ added in v3.1.5
func ListenAndServeDTLSWithOptions[T net.DTLSServerConfig](network string, addr string, cfg T, opts ...dtlsServer.Option) (err error)
ListenAndServeDTLSWithOptions starts a server on address and network over DTLS with go-coap server options. cfg accepts either a *piondtls.Config (backward-compatible legacy path) or a net.DTLSServerOptions value built with net.NewDTLSServerOptions (recommended).
func ListenAndServeTCPTLS ¶
func ListenAndServeTCPTLS(network, addr string, config *tls.Config, handler mux.Handler) (err error)
ListenAndServeTCPTLS Starts a server on address and network over TLS specified Invoke handler for incoming queries.
func ListenAndServeTCPTLSWithOptions ¶ added in v3.1.5
func ListenAndServeTCPTLSWithOptions(network, addr string, config *tls.Config, opts ...tcpServer.Option) (err error)
ListenAndServeTCPTLSWithOptions Starts a server on address and network over TLS specified Invoke options for incoming queries.
func ListenAndServeWithOptions ¶ added in v3.1.5
ListenAndServeWithOption Starts a server on address and network specified Invoke options for incoming queries. The options is only support tcpServer.Option and udpServer.Option
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
dtls/cid/client
command
|
|
|
dtls/cid/server
command
|
|
|
dtls/pki/client
command
|
|
|
dtls/pki/server
command
|
|
|
dtls/psk/client
command
|
|
|
dtls/psk/server
command
|
|
|
mcast/client
command
|
|
|
mcast/server
command
|
|
|
observe/client
command
|
|
|
observe/server
command
|
|
|
options/client
command
|
|
|
options/server
command
|
|
|
oscore/client
command
|
|
|
oscore/server
command
|
|
|
qblockwise/client
command
|
|
|
qblockwise/server
command
|
|
|
simple/client
command
|
|
|
simple/server
command
|
|
|
blockwise/internal/blocks
Package blocks contains wire types shared by the legacy and Q-Block engines.
|
Package blocks contains wire types shared by the legacy and Q-Block engines. |
|
blockwise/qblock
Package qblock implements RFC 9177 datagram transfers independently of the legacy RFC 7959 blockwise engine.
|
Package qblock implements RFC 9177 datagram transfers independently of the legacy RFC 7959 blockwise engine. |
|
oscore
Package oscore contains transport-independent RFC 8613 security-context and message-protection support.
|
Package oscore contains transport-independent RFC 8613 security-context and message-protection support. |
|
oscore/proxy
Package proxy provides a minimal opaque forwarder for OSCORE-protected CoAP requests.
|
Package proxy provides a minimal opaque forwarder for OSCORE-protected CoAP requests. |
|
oscore/store
Package store provides file-backed OSCORE state stores.
|
Package store provides file-backed OSCORE state stores. |
|
pkg
|
|
|
test
|
|
|
net
Helper package for tests, must not be used in production code.
|
Helper package for tests, must not be used in production code. |