Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame does not allow partial reads #9

Open
tjgq opened this issue May 20, 2013 · 0 comments
Open

Frame does not allow partial reads #9

tjgq opened this issue May 20, 2013 · 0 comments
Assignees

Comments

@tjgq
Copy link
Owner

tjgq commented May 20, 2013

Presently, ReadFrame can only read a whole frame in one go. Users that want to track scan progress (e.g., in order to update a progress bar) are forced to use the low-level interface, which is tedious.

Proposed solution:

  • A new method Conn.NewFrame that initiates a scan (Conn.Start) and returns a new Frame object before reading any data.
  • A new method Frame.ReadMore that performs a single read and updates the object state.
  • A new method Frame.ReadAll, for convenience.
  • Attributes LinesRead (int) and Complete (bool) on Frame; we need to signal completion separately from number of lines scanned, because Height may not be known beforehand.
@ghost ghost assigned tjgq Nov 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant