Skip to content

Devlog: TODOs and Bugs #4

@Direwolfesp

Description

@Direwolfesp

This commit 1845112 is full of errors and its just a mock-up on how can I architecture this, but it needs lots of proper testing. Some todos and bugs are:

  • IOMessage does not own the payload and becomes invalid. Possible solutions are: IOMessage owns the payload (simple but less performant), Transfer ownership to the IOMessage and the receiver of the message frees it.
  • IOMessage does not relates a given message with the original sender. As stated in my FIXME so we can pass a pointer to a Client and a callback so he can update its state.
  • related: manage piece buffer (here)
  • while (true) {connect()} is illegal in non-blocking mode. I has to return WouldBlock and wait for EPOLLOUT (here)
  • Reader and writer state machines assume async handling: i dont detect partial writes, and dont flush buffered writes correctly (here)
  • Maybe separate in handleReadNormal handleWriteNormal, also somes typos: (here)
  • filesystem busy waits wastes time (here)
  • Some Message validation: HAVE could have nonexistent pieces, PIECE blocks duplicated, unexpected messages.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions