You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
Hi there!
Wow, thanks for all the feedback. I am glad that this library is actively used. Unfortunately, I don't have the bandwidth to follow up on all the issues you have mentioned and I am no longer active in following all updates around IETF, specifically, CoAP.
I would however strongly encourage you to create a pull request for this library, so that also other users could benefit from your suggested fixes.
@usmaanirfan Hey there! Have you resolved this issue? As I understand your description correctly you're sending multiple messages with a single SCClient instance. As a quite workable workaround I'd advice to create a client per thread instead. You still can reuse single transport layer object in all the clients to reduce the number of connections.
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!
The text was updated successfully, but these errors were encountered: