Skip to content

Defer marking messages and acks as sent

akwizgran requested to merge 2226-defer-marking-messages-and-acks-as-sent into master
  • Add some javadocs to DB classes (rescued from !1571 (closed))
  • Refactor SimplexOutgoingSession to do all its work on a single IO thread (rescued from !1571 (closed))
  • Separate EagerSimplexOutgoingSession (used for removable drives) from SimplexOutgoingSession
  • Add MailboxOutgoingSession
  • Refactor the DB methods used by the various session types

MailboxOutgoingSession doesn't mark messages/acks as sent. Instead it records the message IDs via a DeferredSendHandler so they can be marked as sent later, when the file has been uploaded to the mailbox.

MailboxOutgoingSession monitors the amount of data it's sending and stops when it reaches a predetermined limit. This allows mailboxes to enforce a maximum file size for uploads (briar-mailbox#105 (closed)), which in turn helps to prevent DoS attacks by misbehaving contacts.

Closes #2296 (closed) (not #2226 (closed) as the branch name suggests)

Merge request reports