Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement message retransmission of CON messages #19

Open
jvermillard opened this issue Mar 20, 2015 · 2 comments
Open

Implement message retransmission of CON messages #19

jvermillard opened this issue Mar 20, 2015 · 2 comments

Comments

@jvermillard
Copy link
Contributor

As specified in the RFC, confirmable message should be retransmitted until receiving an Acknowledgement with the same message ID

                        Client              Server
                           |                  |
                           |   CON [0x7d34]   |
                           +----------------->|
                           |                  |
                           |   ACK [0x7d34]   |
                           |<-----------------+
                           |                  | 

The sender retransmits the Confirmable message at exponentially increasing intervals, until it receives an acknowledgement (or Reset message) or runs out of attempts.

@jvermillard
Copy link
Contributor Author

My first idea is to do something like that:
https://gist.github.com/jvermillard/344fb870e23922b31859
Use a goroutine per sent confirmable message for retransmitting if a timeout if reached.
But it would introduce a "Server" object to store all the "in-flight" confirmable message
WDYT?

@dustin
Copy link
Owner

dustin commented Mar 26, 2015

Seems pretty close. There's a bit of thread safety around s.inflight.

It seems that one might want a way to be aware of errors. Not sure what
the best option is there. Callback or channel perhaps?

On Wed, Mar 25, 2015 at 8:05 AM Julien Vermillard [email protected]
wrote:

My first idea is to do something like that:
https://gist.github.com/jvermillard/344fb870e23922b31859
Use a goroutine per sent confirmable message for retransmitting if a
timeout if reached.
But it would introduce a "Server" object to store all the "in-flight"
confirmable message
WDYT?


Reply to this email directly or view it on GitHub
#19 (comment).

neilalexander pushed a commit to neilalexander/go-coap that referenced this issue Jun 12, 2020
fix of blockwise transfering - proper handle unexpected code, fix of windows client dialup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants