- Implemented a new message type for empty file notifications, allowing peers to inform each other about zero-byte files.
- Enhanced the `handle_file_request` function to send notifications for empty files instead of sending empty byte streams.
- Introduced a new `handle_empty_file` function to create empty files on receipt of notifications, including permission checks and hash validation.
- Improved logging for resource transfer status, including detailed information on file creation and hash mismatches.
- Updated resource management to ensure proper handling of empty files in the synchronization process.
- Introduced a new mechanism to track active resources during file transfers, enhancing management and cleanup processes.
- Implemented a callback function to handle transfer completion, logging success or failure statuses for better monitoring.
- Improved error handling in resource management to log exceptions and stack traces, aiding in debugging.
- Updated logging to provide detailed information on resource transfer status and metadata extraction.
- Added support for sending empty files as byte streams, improving transfer efficiency for zero-byte files.
- Updated progress tracking to only activate for non-empty files, optimizing resource management.
- Enhanced logging for resource advertisements to include transfer and data sizes, aiding in debugging and monitoring.
- Improved error handling in resource callback to log exceptions and stack traces for better traceability.
- Introduced a mechanism to track active outgoing file and delta transfers, preventing duplicate requests.
- Implemented cleanup logic to remove transfer entries upon completion or failure.
- Enhanced logging to provide feedback on transfer status and permission checks.
- Ensured thread safety with locks around active transfer modifications.
- Introduced MAX_PACKET_DATA_SIZE to limit the size of data packets.
- Enhanced packet handling to support sub-chunks for file transfers, improving efficiency and reliability.
- Updated logging to provide detailed information on received sub-chunks and their assembly.
- Refined file completion handling to ensure all sub-chunks are received before processing.
- Improved broadcast logic for file updates to handle new, modified, and removed files more effectively.
- Added a delay before requesting file lists to improve synchronization timing.
- Improved logging to indicate when a peer has no files to sync.
- Implemented timeout handling for file resource acceptance to manage transfer failures more effectively.
- Updated permission checks to provide clearer rejection messages for resources without write access.
- Added logging for received packet types to improve debugging.
- Implemented connection handling to manage peer links and permissions more effectively.
- Ensured file list requests are sent upon successful connection, with error handling for remote identity retrieval.
- Implemented conditional handling for file lists based on the presence of a sync directory.
- Improved logging to indicate when peers have files and when no syncing is needed.
- Refined the structure of the file list to include detailed file information during synchronization.
- Updated logging messages to include browser mode information when sending and receiving file lists.
- Added warnings for cases where the sync directory is not set.
- Improved file request and sync logging to provide clearer insights into the synchronization process.
- Implemented checks for incomplete file downloads, including size mismatches and chunk counts, with appropriate logging for errors and warnings.
- Changed CHUNK_SIZE from 8192 to 7000 for optimized performance.
- Modified request_file_list_from_peer to accept a browser_mode parameter for improved logging based on the request context.