💾 Archived View for rawtext.club › ~sloum › geminilist › 006235.gmi captured on 2024-02-05 at 11:02:07. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
almaember almaember at disroot.org
Sun Mar 28 21:07:38 BST 2021
- - - - - - - - - - - - - - - - - - -
Hello,
I'm planning on creating my own Gemini client (with C99 and OpenSSL, ifyou want to know). However, I have a problem with how I should beimplementing the downloading part.
So, how should I be buffering a Gemini connection? Since there is nosize indicator, I can't be sure everything even fits into memory, orhow much time it's going to take to download, or if it's even going toend at all.
Another problem is long-polling. Through my exploration of Geminispace,I found a few capsules that used a hack to push live updates to theclient. Specifically, these servers didn't close the connection, butinstead kept it open and just sent new data when something happened.
Since the spec says nothing (or I'm blind) about buffering, so I wantto ask others about what I should be doing, while still being able toactually parse the output.
My ideas as of right now:
- Have a big buffer and store everything in it until the connection is closed. The connection would be terminated if: - the connection closes - the server didn't send anything for X seconds - Buffer by line and don't close the connection unless the user terminates it (by pressing the stop key or by loading another capsule). Compatible with long polling.
Thanks in advance for any help!
~almaember-------------- next part --------------A non-text attachment was scrubbed...Name: not availableType: application/pgp-signatureSize: 659 bytesDesc: OpenPGP digital signatureURL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210328/6c95f4cb/attachment.sig>