Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

User-visible changes to SnailNet, newest first. Versions follow
[Semantic Versioning](https://semver.org/).

## 1.0.0 - Unreleased

First release.

### Added

- A TCP relay that holds traffic heading back to the client for a fixed
number of milliseconds. Traffic to the server is forwarded at once, so a
request and response pays the latency once.
- A window for setting the listen address and port, the target address and
port, and the latency, with Start and Stop buttons and a status block that
counts active and total sessions. The window can be resized and scales
cleanly on high-DPI displays.
- A command line mode in the same executable: `--listen-addr`,
`--listen-port`, `--target-addr`, `--target-port`, `--latency`, and
`--help`. Ctrl+C stops it, and the exit code is `0` for a clean stop and
`1` for a bad argument or a failure.
- Several clients at once, each with its own connection to the target.
- Up to 1 MB of delayed data held per connection, so a slow client applies
back pressure instead of growing memory without limit.
- A half close from either side is passed through, not turned into a full
close.
- A User Guide, shipped as `userguide.pdf` with each release.
6 changes: 5 additions & 1 deletion Docs/developerguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ Issues and pull requests are welcome.
2. Keep the conventions above; `pre-commit` will catch formatting.
3. Build clean at `/W4`, for both x64 configurations.
4. Run the test suite before opening the pull request.
5. Reference the issue in the pull request description with `Closes #12`.
5. Add a line to `CHANGELOG.md` for any change a user would notice. New
entries go under the top heading; if that heading is a released
version, add `## Unreleased` above it first.
6. Reference the issue in the pull request description with `Closes #12`.

## Releases

Expand All @@ -193,6 +196,7 @@ When cutting a release, bump the version in all of these together:
- `README.md` (the heading)
- `Docs/userguide.md` (the `Version` line under the title)
- `Tests/pyproject.toml` and `Tests/docs/conf.py` (`release`)
- `CHANGELOG.md` (rename the top heading to `## x.y.z - YYYY-MM-DD`)

### What the release package contains

Expand Down
3 changes: 2 additions & 1 deletion Docs/userguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ clients can be relayed at once without affecting each other's timing.
## Using the window

The window has three tabs: **Relay**, where you set it up and run it;
**Help**, a short version of this guide; and **About**.
**Help**, a short version of this guide; and **About**. You can resize or
maximize it, and the fields widen to fit.

On the **Relay** tab, fill in five fields:

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ There is a file-by-file breakdown in the
| [Docs/userguide.md](Docs/userguide.md) | Anyone running SnailNet | The GUI, command line flags, worked examples, troubleshooting. Rendered to PDF for the release package |
| [Docs/developerguide.md](Docs/developerguide.md) | Contributors | Building, project settings, architecture, coding conventions, releases |
| [Docs/testguide.md](Docs/testguide.md) | Contributors | Running the test suite, reading its output, what each test proves |
| [CHANGELOG.md](CHANGELOG.md) | Everyone | What changed in each release |

Behavior that users can see, such as flags, defaults, and examples, is
documented once in the User Guide. The other guides link to it rather than
Expand Down
5 changes: 5 additions & 0 deletions SnailNet/SnailNet/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ static INT RunGui(VOID)
look like a plain GUI app after a brief, unavoidable flash. */
(VOID) ShowWindow(GetConsoleWindow(), SW_HIDE);

/* Before any window exists. Windows then scales the frame and common
controls itself, and Ui.c scales the layout, instead of stretching a
96 DPI bitmap of the window. */
(VOID) SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);

hWindow = WindowCreate(GetModuleHandleW(NULL), SW_SHOWDEFAULT, &iStatus);

if (NULL == hWindow)
Expand Down
6 changes: 4 additions & 2 deletions SnailNet/SnailNet/Snailnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,14 @@ typedef enum _SNAILNET_TAB_INDEX
} SNAILNET_TAB_INDEX,
*PSNAILNET_TAB_INDEX;

//
// Sizes at 96 DPI; Ui.c scales them to the window's DPI. CLIENT_W and
// CLIENT_H are the starting and smallest client area.
//
typedef enum _SNAILNET_LAYOUT
{
MARGIN = 16,
LABEL_W = 150,
FIELD_W = 210,
ROW_H = 32,
ROW_GAP = 10,
BUTTON_W = 110,
Expand All @@ -137,7 +140,6 @@ typedef enum _SNAILNET_LAYOUT
ICON_SIZE = 64,
HEADER_H = 112,
PANEL_PAD = 8,
TABS_H = 410,
STATUS_H = 92, // four lines: three of detail plus one for an error
CLIENT_W = 440,
CLIENT_H = 544
Expand Down
Loading