From f1ef6b66434849cb236f6dee2a0189d25f173cb4 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 19:05:48 +0200 Subject: [PATCH] State the octet cap's charge as a rule a consumer can size with --- CHANGELOG.md | 9 +++++---- README.md | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 822a669..5cbf5d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,10 +35,11 @@ - An `alert_notification` or an `outbind` from the peer is logged and left unanswered, as SMPP 3.4 gives neither a response. Each one used to emit `sessionError`, `"alert_notification" has no response command`. -- `maxOctets` charges each held segment about 1 KB, and every TLV it carries 300 octets, for the - memory they keep beyond their octets. Segments of empty fields or thousands of empty TLVs used to - count as next to nothing, so a peer could hold far more than the cap. A `maxOctets` tuned low now - holds fewer segments. +- `maxOctets` charges each held segment 1000 octets beyond its own, and each TLV on it, every repeat + included, 300 more. Segments of empty fields or thousands of empty TLVs used to count as next to + nothing, so a peer could hold far more than the cap. **Raise a `maxOctets` you tuned low**: it now + holds a sixth to a tenth as many segments, and an incomplete message evicted over the cap is lost, + since its segments were already answered. - `server()` refuses a `maxOctets` below 1 or not a whole number, `Infinity` included, like its other limits. `server({ maxOctets: 0 })` used to start and then refuse every multipart message. - `callback_num`, `callback_num_atag`, `callback_num_pres_ind`, `broadcast_area_identifier` and diff --git a/README.md b/README.md index d93ca5e..f77a711 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ All optional. Timeouts are milliseconds. | `tls` | `false` | A `tls.TlsOptions` object with your certificate and key. A bare `true` is refused. | | `idleTimeout` | `40000` | Drop a peer that has been silent this long. | | `maxReassembly` | `1000` | Incomplete multipart messages held per session. | -| `maxOctets` | `67108864` | Roughly the memory incomplete multipart messages may hold per session. | +| `maxOctets` | `67108864` | Roughly the memory incomplete multipart messages may hold per session: each held segment counts its octets plus 1000, and each TLV on it, every repeat included, 300 more. | | `reassemblyTimeout` | `300000` | How long a late segment can still join an incomplete message. | | `responseTimeout`, `shutdownTimeout`, `maxOutstanding`, `log`, `signal` | as for the client | |