Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
briar
briar
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 694
    • Issues 694
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 17
    • Merge Requests 17
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • briar
  • briarbriar
  • Issues
  • #1374

Closed
Open
Opened Sep 03, 2018 by Ben Wie@bontricDeveloper

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 Prototype
Milestone
Mailbox Prototype (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: briar/briar#1374