Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
briar
briar
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 579
    • Issues 579
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • briar
  • briarbriar
  • Issues
  • #1374

Closed
Open
Opened Sep 03, 2018 by Ben Wie@bontric
  • Report abuse
  • New issue
Report abuse New issue

Implement StreamWriter/Reader writeTag and readTag methods

The current implementation of the StreamWriter/StreamEncrypter write a tag, which allows the recipient to identify the connection. This tag is written automatically when the first message is written (or the stream is flushed).

Writing this tag explicitly before sending any message simplifies the implementation of mailbox session management. A public writeTag method should be added to the 'StreamWriter'/'StreamEncrypter'.

Additionally, the readTag method, which is currently part of the ConnectionManager, is also required to manage mailbox connections. To avoid redundancy we could add a StreamReader interface and implement a readTag function ('StreamReader' currently extends an InputStream).

As @akwizgran suggested, a workaround is to simply flush the StreamWriter, but this also writes an empty frame.

Assignee
Assign to
Mailbox
Milestone
Mailbox
Assign milestone
Time tracking
None
Due date
None
1
Labels
Task
Assign labels
  • View project labels
Reference: briar/briar#1374