Commit Graph
11 Commits
Author SHA1 Message Date
cozis d7a2262172 Fix compilation errors of the web interface 2025-11-22 23:59:08 +01:00
Claude f856bd0e05 Track actual bytes read in read operations
Add functionality to determine the actual number of bytes read during
read operations, making it possible to detect when a read was truncated
because it went past the end of the file.

Changes:
- Modified file_tree_read() to calculate and return actual_bytes via
  new output parameter
- Updated metadata server to send actual_bytes in READ_SUCCESS messages
- Added bytes_read field to ToastyResult structure
- Modified client to parse, store, and report actual bytes read
- Updated toasty_read() to return the actual number of bytes read
  instead of always returning 0
- Fixed web server to use bytes_read field instead of non-existent
  count field

This allows clients to distinguish between:
- Reading zeros because the file is sparse (has holes)
- Reading past the end of the file (truncated read)
2025-11-22 22:22:43 +00:00
cozis b930ba08e3 Add the ability to associate an opaque user pointer to a ToastyHandle which is then returned in its associated ToastyResult 2025-11-22 23:09:31 +01:00
cozis e1fa3729c6 Drop the MAX_CONNS macro and define TCP_CONNECTION_LIMIT, TCP_POLL_CAPACITY, TCP_EVENT_CAPACITY instead 2025-11-22 22:59:32 +01:00
cozis b0313ffcf8 Make toasty client thread-safe and implement toasty_wakeup 2025-11-20 03:51:01 +01:00
cozis 09f1ed4b3e Reorganize types in ToastyFS.h by placing them near function interfaces that reference them 2025-11-17 11:50:22 +01:00
cozis 46db334a2e Resolve compilation errors and implement blocking API 2025-11-17 11:32:09 +01:00
cozis b591408cc9 Fix some build errors 2025-11-16 13:01:08 +01:00
cozis f7dc52ae8f Add example of the blocking API 2025-11-16 12:21:31 +01:00
cozis 58d2d7def3 Polish API in ToastyFS.h 2025-11-16 11:59:58 +01:00
cozis e1cdc28d4d Rename project to ToastyFS 2025-11-16 02:10:59 +01:00