iCoAP
iCoAP copied to clipboard
Issue found in multi-threaded environment, when multiple request and responses are processed in parallel.
Hi,
We are using this library in our app and it works great! However, we are facing following issues while using the library in a multi-threaded environment, when multiple request and responses are sent in parallel:
-
Block 2 request is sent based on last request which is sent from library. It should be sent on the basis of latest block response received. When library receives any new block, it is creating a new request for getting its next block. This next block request should be created on the basis of block 1 which is just received. Instead, it is creating next block request on the basis of an old request (pendingCoAPMessageInTransmission) which is sent from library. This old request could be of any other request rather from the block received.
-
isMessageInTransmission variable is a shared variable in library. This is limitation in which if there are multiple request response done in parallel, we will not get correct state of isMessageInTransmission. If there are 2 message sent in parallel, we are not getting correct in transmission state.
-
Individual Blocks are received in application from the library. And app needs to append all blocks and create complete response. Instead, Library should handle all blocks and share complete response with app once all blocks are received.
-
Retransmitted response is not handled by the library. Application needs to check whether response is retransmitted or new one and then use the response based on the message ID. Library should discard response if app has already processed it or if it has already sent the same response to the app.
These are not fixed in the new Swift Library also.
Thanks!