master
DirectoryScanSender
DirectoryScanSender is a .NET application that scans a directory recursively and sends eligible files to a TCP server using a simple delimiter-based protocol.
It is the sender counterpart to DirectoryScanReceiver, and both projects can work together out of the box with the current default settings.
Companion Project
- Receiver counterpart:
DirectoryScanReceiver - Shared default TCP port:
7156
Shared Protocol
Both projects use the same message format:
<path>|<length>|<content>\r\n\r\n
path: file path string sent by the senderlength: declared payload lengthcontent: payload content
Multiple messages can be sent over the same TCP connection, each terminated by \r\n\r\n.
Features
- Recursively scans directories
- Sends files over a single TCP connection
- Skips files larger than
100000bytes - Continues running even if individual files fail to read or send
- Uses parallel directory traversal
Default Behavior
- Target directory: the current user's
Documentsfolder - Connection target: host
localhost, port7156 - File size limit: files smaller than
100000bytes
Requirements
- .NET SDK with support for
net10.0 - Network access to the configured TCP server
Build and Run
From the repository root:
dotnet build
dotnet run --project DirectoryScanSender
Compatibility Notes
- The sender is intended to be used with
DirectoryScanReceiveror another receiver that follows the same message format. - The current defaults (
localhost:7156) match the localDirectoryScanReceiverproject. - The transfer uses plain TCP and does not include authentication or encryption.
- Console output is used for basic status and error messages.
- Configuration values (host, port, scan path) are defined in
DirectoryScanSender/Program.cs.
License and Disclaimer
This project may be used, copied, modified, and shared freely.
It is provided as is, without warranty of any kind. The author is not liable for any damages or losses resulting from its use.
Description
Languages
C#
100%