The diff changes the assignment of `connection_nr` from `self.connection_count` (which resets on each new connection batch) to `self.total_connection_count` (which monotonically increases). This ensures each connection receives a unique, ever-increasing identifier rather than reusing numbers from previous cycles, preventing confusion in logs and debugging under high concurrency.
Remove debug=True default parameter from Socket.__init__ and set it to False to reduce I/O overhead. Delete two print statements ("Bef read" and "Aff read") from the Application class request handling loop, and remove commented-out connection keep-alive logic to streamline execution path for high-concurrency throughput.
The thread count is increased from 500 to 2500 and buffer size from 64 to 4096 in the application constants. The `serve_async` and `serve` methods now accept an optional `backlog` parameter defaulting to `ZAMENYAT_BACKLOG=100`, which is passed to `asyncio.start_server` for improved connection queue management under high load.
- Decrease ZAMENYAT_BUFFER_SIZE from 8192 to 64 bytes for finer-grained I/O control
- Add optional debug parameter to AsyncWriter and AsyncReader constructors
- Implement read_until method in AsyncReader for delimiter-based message parsing
- Print chunk data to stdout when debug flag is enabled in both read and write operations
Introduces AsyncReader and AsyncWriter classes that wrap asyncio reader/writer pairs with configurable buffer sizes and chunked write draining. Also adds a Socket class combining both wrappers for unified stream handling. These changes support more granular control over network I/O in high-latency environments.
Create the foundational project structure for the zamenyat HTTP content replacement bridge, including a Makefile with targets for environment setup, installation, formatting, and building; a pyproject.toml declaring setuptools as the build backend; a setup.cfg with package metadata, dependencies on the internal app library, and a console_scripts entry point; a README.md with a corrected heading and project description; a __main__.py module implementing argument parsing for host, port, upstream-host, and upstream-port; and an app.py module defining the Application class with async header parsing, connection tracking, and configurable buffer/header size constants.