Switch branches/tags
Nothing to show
Commits on Feb 14, 2017
  1. Update examples to demonstrate mux

    dustin committed Feb 14, 2017
    Closes #37
Commits on Dec 11, 2016
  1. Expose ParseMessage

    dustin committed Dec 11, 2016
    Closes #36
Commits on Dec 16, 2015
  1. Handle Receive error.

    rakyll authored and dustin committed Dec 15, 2015
Commits on Oct 14, 2015
Commits on Oct 13, 2015
  1. Tests: Add test case with all 16 options

    dubek committed Sep 28, 2015
    TestEncodeMessageWithAllOptions builds and parses a CoAP packet with all
    the 16 available CoAP options.  assertEqualMessages was moved to
    message_test.go where it belongs.
Commits on Oct 12, 2015
  1. Add Serve() to allow user-supplied listener

    dubek committed Sep 25, 2015
    The existing ListenAndServe function runs forever without any mechanism
    to stop it.  This change introduces Serve which receives a user-supplied
    UDP listener; this allows the user to close the listener (on another
    goroutine), which will cause the ReadFromUDP function will fail and the
    loop will terminate, and the Serve() goroutine will be released.
    The commit also changes existing behaviour of ListenAndServe, which used
    to continue the loop endlessly even when encountering errors (such as
    closed listener).  The new Serve code (which is also used in
    ListenAndServe) examines the error, and if will retry the loop only if
    it's a transient error.
    Moreover, full-cycle tests of the CoAP client and server were added in
  2. Detect truncated packets when handling extended option lengths

    dubek committed Oct 12, 2015
    When parsing extending option lengths, verify that enough bytes are left
    in the packet.  This fixes a panic that occured when a specially crafted
    truncated packet was processed.
    The TestInvalidMessageParsing was refactored to allow easy additions of
    such cases to the test suite.
    The bug was found with the help of go-fuzz
  3. Change minimal packet size to 4 bytes

    dubek committed Oct 12, 2015
    A valid packet without token+options+payload will takes only 4 bytes.
    The bug was found with the help of go-fuzz
  4. Return error when parsing packet with fewer bytes than TKL field indi…

    dubek committed Oct 12, 2015
    This fix solves a panic which is raised when parsing a packet which
    indicates a non-zero token length (TKL) but the packet itself is shorter
    than the indicated token length.  In such a case, a "truncated" error is
    return from UnmarshalBinary.
    The bug was found with the help of go-fuzz
  5. Ignore unknown options or options with illegal length

    dubek committed Oct 12, 2015
    According to the CoAP RFC, unknown options and options whose values have
    illegal lengths should be ignored (skipped). The option value parsing
    was refactored into the parseOptionValue function which includes the new
    option ID check and option value length check.
    This fix also mitigates a panic that was caused when trying to parsing
    uint fields with lengths longer than 4.
    The problematic packet was found with the help of afl
Commits on Sep 23, 2015
Commits on Sep 22, 2015
  1. Use SetOption for SetPath

    dustin committed Sep 22, 2015
  2. Use sort.Stable for sorting opts.

    dustin committed Sep 22, 2015
    Closes #24
  3. Added a test for MediaTypes

    dustin committed Sep 22, 2015
Commits on Aug 11, 2015
  1. Implement extended option headers

    Vyacheslav Trushkin authored and dustin committed Jul 27, 2015
    According to RFC7252 option header may be extended
    by additional bytes (sect 3.1). This patch implements parsing
    and formatting extended Delta and Length attributes.
    * Fix (Un-)MarshalBinary functions
    * Fix binary blobs in tests
Commits on Apr 6, 2015
  1. Make marshal consistent with unmarshal

    dustin committed Apr 6, 2015
    though still inconsistent with the comment
Commits on Apr 4, 2015
  1. Some tests for tcp messages.

    dustin committed Apr 4, 2015
    I can't actually find a spec.  The description in the code doesn't match
    the code, but at least there's a test that can read a message from a
Commits on Apr 2, 2015
Commits on Apr 1, 2015
  1. Avoid make for small, fixed-size slice

    dustin committed Apr 1, 2015
    benches a lot slower
  2. doc style fix

    dustin committed Apr 1, 2015
Commits on Mar 26, 2015
  1. Added missing Observe option

    dustin committed Mar 26, 2015
  2. Removed SUBSCRIBE op

    dustin committed Mar 26, 2015
Commits on Mar 25, 2015
  1. Small style change

    dustin committed Mar 25, 2015
  2. first support for observe

    jvermillard authored and dustin committed Mar 20, 2015
     * removed old SUBSCRIBE action
     * renamed and updated subserver and subclient examples to obsclient and obsserver
Commits on Dec 30, 2014
  1. oh look, coap is an RFC now

    dustin committed Dec 30, 2014
Commits on Dec 29, 2014
  1. Fix handling of string slices as options

    dustin committed Dec 29, 2014
    Closes #16
Commits on Dec 22, 2014
  1. Handle token parsing correctly

    dustin committed Dec 22, 2014
    Closes #15
Commits on Nov 29, 2014