Use Callbacks intead of buffer for output

Registered by Paul "LeoNerd" Evans

Currently, the output from libvterm is implemented using a (fixed-size) byte buffer. This has the potential to fill up, due to the fact that the embedding application might not be reading it fast enough, or that the input contains "packet amplifiers" like DECRQSS or similar.

It would be more robust if instead, the application provided a write-like callback function so it can perform its own buffer management, or whatever is required, instead of libvterm having to buffer it itself.

There might need to be special consideration of a special error value to mean "retry again"; asking libvterm to not consume the final byte of input that caused it to need to emit this string, and instead do it again later once the application has been given a chance to rearrange. However, that's not going to be possible for input events, so it remains to be seen how useful this could be.

Blueprint information

Status:
Started
Approver:
None
Priority:
Medium
Drafter:
Paul "LeoNerd" Evans
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Beta Available
Milestone target:
None
Started by
Paul "LeoNerd" Evans

Related branches

Sprints

Whiteboard

(?)

Work Items

Work items:
Code: DONE

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.