beeing able to cancel an ongoing CON transaction

Description

The current CoAP library can be used as a CoAP client for CON transaction. If the server isn't there, the transaction will timeout and the CoAP library raises the appropriate exception.

The problem is that it take a long time to time out (~140s). If the user mistyped the IPv6 address of the mote, he/she has to wait for that time.

What we need is a way of cancelling the transaction. The complicated part is that this requires the CoAP library to close its UDP binding. It's unclear at this point what the best way of doing that is in Python. Some options are:

  • delete the handler, maybe an exception is risen on the listening thread? (this is how pyserial works)

  • send a well-known string (e.g. "teardown") to the listening thread, which then returns. Of course, this allows for some nasty security attacks

Environment

None

Assignee

marcelo barros de almeida

Reporter

Thomas Watteyne

Labels

None

Story Points

None

Priority

Normal
Configure