[gnutls-devel] GnuTLS | guile: Allow session record ports to have a 'close' procedure (!1610)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Mon Jul 11 12:26:17 CEST 2022
civodul created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/1610
Project:Branches: civodul/gnutls:wip-session-record-port-close to gnutls/gnutls:master
(This patch depends on !1608.)
This patch lets users assign a `close` procedure to a session record port, either via `set-session-record-port-close!` or as a second argument to `session-record-port`. That procedure is called when the port is closed, which typically lets users reclaim resources such as closing the file descriptor or port that backs a session.
For the record, until now, this cleanup had to be handled by wrapping the session record port in a "custom" port with its own `close` procedure, as in [this `tls-wrap` procedure](https://git.savannah.gnu.org/cgit/guile.git/tree/module/web/client.scm?id=7e048c6c516fa477366c6b4b09914dcff44b2f5e#n245). This was not only wasteful, it also prevented use of session record ports in a non-blocking context.
Tested with Guile 2.0.14, 2.2.7, and 3.0.7.
* [X] Commits have `Signed-off-by:` with name/author being identical to the commit author
* [X] Code modified for feature
* [X] Test suite updated with functionality tests
* [ ] Test suite updated with negative tests
* [X] Documentation updated / NEWS entry present (for non-trivial changes)
* [X] CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)
## Reviewer's checklist:
* [ ] Any issues marked for closing are addressed
* [ ] There is a test suite reasonably covering new functionality or modifications
* [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md`
* [ ] This feature/change has adequate documentation added
* [ ] No obvious mistakes in the code
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1610
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gnutls-devel