hcoap-0.1.0.0: CoAP implementation for Haskell.

Maintainerulf.lilleengen@gmail.com
Safe HaskellNone
LanguageHaskell2010

Network.CoAP.Client

Description

License: BSD3

The CoAP client API is intended to provide the minimal building block needed for sending CoAP requests. The API exposes CoAP request and response types and handles all internal messaging details of the CoAP protocol.

Synopsis

Documentation

data Client Source

A client that can perform CoAP requests.

data Method Source

Request Method

Constructors

GET 
POST 
PUT 
DELETE 

type OptionString = ByteString Source

CoAP Option ByteString

data MediaType Source

Supported media types in CoAP RFC for ContentFormat

Instances

doRequest :: Client -> Endpoint -> Request -> IO Response Source

Send a CoAP request to a given endpoint. Returns a CoAP response.

createClient :: Transport -> IO Client Source

Create a client using a given transport. This will spawn internal messaging threads making the client ready to send requests.

shutdownClient :: Client -> IO () Source

Shuts down the internal messaging threads and stops the client