Skip to content

DTLS implementation crashes and a slight fix #2

@ds600

Description

@ds600

This library uses Bouncy castle for DTLS management, this library is Blocking and not thread save, the transport receives are still called in new Tasks tho. This leads to session crashes as soon as package size varies, as bouncy castle tries to write content into a wrong (to small) buffer.

The best solution would be to actually use a non blocking library, but for now I implemented some changes, so that this particular issue wouldn't rise again. I changed the waitmillis for the transport to 1, as "0" isn't support in bouncy castle anymore. The fire method for the CoAP part runs in a seperate Task now, as waiting for it would also interfere with our DTLS business.

This should work if the session isn't sending packages within nanoseconds, you can pull from my branch.
https://github.com/ds600/CoAP.NET-DTLS-changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions