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

Retransmission and new server API #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jvermillard
Copy link
Contributor

I know this pull-request is a bit disruptive :)
When I implemented retransmission I found some part are missing in this CoAP implementation.
like token correlation, piggy-backed ack, etc..

It's still a work in progress, but I wanted to show it before I change too much of the original project

Spawn a go routine for each CoAP Confirmable message.
Will resend if needed following the RFC backoff pattern.
Send response with the request token for matching query/answer.

Add the capability to choose between piggy backend answer or seperate
acking.

Abstract request answering for being able to plug multiple transport
(UDP, TCP, websockets, (D)TLS)
@jvermillard
Copy link
Contributor Author

About piggy backed & separate responses:
https://tools.ietf.org/html/rfc7252#section-5.2

@jvermillard jvermillard changed the title Retransmit Retransmission and new server API May 2, 2015
@dustin
Copy link
Owner

dustin commented Aug 7, 2015

Would you be interested in helping maintain this? I don't like having these things sit out too long. I'd rather have someone actively using it push it forward than to hold it back since my needs are met.

@jvermillard
Copy link
Contributor Author

Hi, sorry for the delay, august break 😄

Thanks for the rust. Today it's not part of my CoAP stack (I mainly use Californium & Java) but I think I can help maintaining the project. Today my main focus is implementing DTLS with Go, with is a quite long challenge.

@schmohlio
Copy link

I'd be interested in helping maintain @dustin @jvermillard . Any immediate next steps I can help with?

// wait for ack or timeout
timeout := randTimeout()

for f.retrans < MAX_RETRANSMIT {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once f.retrans == MAX_RETRANSMIT don't we want to remove the entry from retrans.inflight? To be more robust in terms of memory consumption against recipients who aren't responding at the application level?

return s
}

func (retrans *Retransmitter) Record(req Message, a *net.UDPAddr) error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to pass in some channel or something so that we can keep track of messages that were never delivered? Or, do we maybe want to provide the option to block until received for clients?

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

Successfully merging this pull request may close these issues.

3 participants