💾 Archived View for rawtext.club › ~sloum › geminilist › 001894.gmi captured on 2020-09-24 at 01:34:23. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

<-- back to the mailing list

SPOOFED: Re: [ANN] Tiny ad-hoc server

James Tomasino tomasino at lavabit.com

Thu Jun 25 13:09:25 BST 2020

- - - - - - - - - - - - - - - - - - - 

On 6/25/20 11:34 AM, defdefred wrote:

I don't understand how the infinite while works in this case...
Is it consuming cpu all the time?

ncat waits only for a single connection, then terminates. I tried using the switch to keep the connection alive and reuse it, but that means the connection is never closed on any single request and most clients display nothing. By wrapping it in an infinite while I just tell ncat to start a new listener when the previous one is used. There's only ever one running at a time, and it's a single thread, but traffic is low and it seems to work just fine.