packages feed

hcoap 0.1.0.0 → 0.1.0.1

raw patch · 5 files changed

+37/−2 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

+ README.md view
@@ -0,0 +1,7 @@+Hcoap is a haskell CoAP library. See http://coap.technology/ for more information about the CoAP+protocol. The library aims to support RFC 7252 specification, and currently only support non-secure+CoAP transport.++The library is split into a high-level API in Network.CoAP.Server and Network.CoAP.Client, and a lower layer API in Network.CoAP.Message for working directly with CoAP messages.++[![Build Status](https://travis-ci.org/lulf/hcoap.svg?branch=master)](https://travis-ci.org/lulf/hcoap)
hcoap.cabal view
@@ -1,5 +1,6 @@+copyright:           Copyright (c) 2016, Ulf Lilleengen name:                hcoap-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Library for handling CoAP protocol license:             BSD3 license-file:        LICENSE@@ -13,9 +14,11 @@                      building CoAP servers and clients on top of a messaging layer which provides                      reliable transport of CoAP requests/responses. synopsis:            CoAP implementation for Haskell.-stability:           experimental+stability:           experimental  cabal-version:       >=1.10 +extra-doc-files:     README.md+ library   exposed-modules: Network.CoAP.Server, Network.CoAP.Client, Network.CoAP.Message, Network.CoAP.Transport   other-modules: Network.CoAP.Types, Network.CoAP.MessageCodec, Network.CoAP.Messaging@@ -65,3 +68,7 @@                        bytestring,                        hcoap   default-language:    Haskell2010++source-repository head+  type:     git+  location: git://github.com/lulf/hcoap.git
src/Network/CoAP/Client.hs view
@@ -5,6 +5,12 @@ 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.++Example:+@+  client <- createClient (createUDPTransport socket)+  doRequest client (SockAddrInet 5683 0) (Request GET [UriPath path] Nothing True)+@ -} module Network.CoAP.Client ( Request(..)
src/Network/CoAP/Server.hs view
@@ -5,6 +5,14 @@ License: BSD3  The CoAP server API is intended to provide the minimal building block needed for creating CoAP servers. The API exposes CoAP requests and response types and handles all internal messaging details of the CoAP protocol.++Example:+@+  server <- createServer (createUDPTransport socket) (\(req, endpoint) = do+    let payload = Just (B.pack ("{\"msg\":\"Hello, Client\"}"))+    return (Response Content [ContentFormat ApplicationJson] payload))+  runServer server+@ -} module Network.CoAP.Server ( Request(..)
src/Network/CoAP/Types.hs view
@@ -1,3 +1,9 @@+{-|+Module:  Network.CoAP.Types+Description: CoAP types+Maintainer: ulf.lilleengen@gmail.com+License: BSD3+-} module Network.CoAP.Types where  import Data.ByteString.Lazy@@ -51,6 +57,7 @@ -- | Request Method data Method = GET | POST | PUT | DELETE deriving (Show, Eq) +-- | A message with additional context on source and destination data MessageContext = MessageContext { message :: Message                                      , srcEndpoint :: Endpoint                                      , dstEndpoint :: Endpoint } deriving (Show)