data_decompress now handles ZSTD_CONTENTSIZE_UNKNOWN by growing the output buffer dynamically (2x growth)
data_compress returns NULL instead of calling exit() on failure
data_decompress returns NULL instead of calling exit() on failure
Server receive path checks for NULL from decompression and sends STATUS_ERROR gracefully
Send path (file_send_single_calls) exits with a clear log message on compression failure
Three improvements:
**1. Multi-client TCP server** (transport_tcp.c, server.c)
- `server_listen` now loops on accept() and forks a child per connection
- Parent reaps children automatically via SIGCHLD=SIG_IGN
- Signal handlers for SIGINT/SIGTERM clean up the listening socket on shutdown
- Tested with parallel clients — both complete successfully
**2. Protocol version negotiation** (config.h, config.c, client_cli.c)
- Added PROTOCOL_VERSION constant ("1.0.0")
- Server checks client version on connect; mismatch sends STATUS_ERROR and exits
- Client uses the constant via PROTOCOL_VERSION instead of a hardcoded string
- Prevents silent corruption from mismatched client/server builds
**3. Streaming decompression & error handling** (compression.c, server.c, multiprocessing.c, file.c)
- data_decompress now handles ZSTD_CONTENTSIZE_UNKNOWN by growing the output buffer dynamically (2x growth)
- data_compress returns NULL instead of calling exit() on failure
- data_decompress returns NULL instead of calling exit() on failure
- Server receive path checks for NULL from decompression and sends STATUS_ERROR gracefully
- Send path (file_send_single_calls) exits with a clear log message on compression failure
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Three improvements:
1. Multi-client TCP server (transport_tcp.c, server.c)
server_listennow loops on accept() and forks a child per connection2. Protocol version negotiation (config.h, config.c, client_cli.c)
3. Streaming decompression & error handling (compression.c, server.c, multiprocessing.c, file.c)