diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-09-03 19:59:04 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-09-03 19:59:04 +0200 |
| commit | 288312a8126d71fae26c9d62a8cd342d830e1c5f (patch) | |
| tree | aa56a083e0222975888a24cf8d755b7d0a4f1bc0 /core/net/doc.odin | |
| parent | 0e6109e171d24b3bb17289219ae3b482c24f2460 (diff) | |
core: improve package doc comments for the documentation generator
Diffstat (limited to 'core/net/doc.odin')
| -rw-r--r-- | core/net/doc.odin | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/core/net/doc.odin b/core/net/doc.odin index 996f8147e..ed720c0ae 100644 --- a/core/net/doc.odin +++ b/core/net/doc.odin @@ -13,36 +13,34 @@ */ /* - Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures. - For other protocols and their features, see subdirectories of this package. - - Features: - - Supports Windows, Linux and OSX. - - Opening and closing of TCP and UDP sockets. - - Sending to and receiving from these sockets. - - DNS name lookup, using either the OS or our own resolver. - - Planned: - - Nonblocking IO - - `Connection` struct - A "fat socket" struct that remembers how you opened it, etc, instead of just being a handle. - - IP Range structs, CIDR/class ranges, netmask calculator and associated helper procedures. - - Use `context.temp_allocator` instead of stack-based arenas? - And check it's the default temp allocator or can give us 4 MiB worth of memory - without punting to the main allocator by comparing their addresses in an @(init) procedure. - Panic if this assumption is not met. - - - Document assumptions about libc usage (or avoidance thereof) for each platform. - - Assumptions: - - For performance reasons this package relies on the `context.temp_allocator` in some places. - - You can replace the default `context.temp_allocator` with your own as long as it meets - this requirement: A minimum of 4 MiB of scratch space that's expected not to be freed. - - If this expectation is not met, the package's @(init) procedure will attempt to detect - this and panic to avoid temp allocations prematurely overwriting data and garbling results, - or worse. This means that should you replace the temp allocator with an insufficient one, - we'll do our best to loudly complain the first time you try it. +Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures. +For other protocols and their features, see subdirectories of this package. + +Features: +- Supports Windows, Linux and OSX. +- Opening and closing of TCP and UDP sockets. +- Sending to and receiving from these sockets. +- DNS name lookup, using either the OS or our own resolver. + +Planned: +- Nonblocking IO +- `Connection` struct; A "fat socket" struct that remembers how you opened it, etc, instead of just being a handle. +- IP Range structs, CIDR/class ranges, netmask calculator and associated helper procedures. +- Use `context.temp_allocator` instead of stack-based arenas? +And check it's the default temp allocator or can give us 4 MiB worth of memory +without punting to the main allocator by comparing their addresses in an @(init) procedure. +Panic if this assumption is not met. +- Document assumptions about libc usage (or avoidance thereof) for each platform. + +Assumptions: +For performance reasons this package relies on the `context.temp_allocator` in some places. + +You can replace the default `context.temp_allocator` with your own as long as it meets +this requirement: A minimum of 4 MiB of scratch space that's expected not to be freed. + +If this expectation is not met, the package's @(init) procedure will attempt to detect +this and panic to avoid temp allocations prematurely overwriting data and garbling results, +or worse. This means that should you replace the temp allocator with an insufficient one, +we'll do our best to loudly complain the first time you try it. */ -package net
\ No newline at end of file +package net |