<-- 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.