NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.95k stars 1.7k forks source link

Timeout in Nanohttpd Server Android #399

Closed abdymm closed 7 years ago

abdymm commented 7 years ago

How to set a timeout in NanoHttpd Server, and retrieve callback from timeout ?

LordFokas commented 7 years ago

You have to be more specific. We're more than glad to help our users, but we need details.

abdymm commented 7 years ago

ok, i want to set timeout for nanohttpd server, let say timeout is 10 second , when no more interaction from any client to server untill 10 second i want to stop() the server and got callback when the timeout is up. for now i have create my own timeout handler, but its great if the timeout is from nanohttpd @LordFokas

LordFokas commented 7 years ago

That's not really in NanoHTTPD's global use case... the correct way to do it is exactly what you did -- create your own solution. We are in a very fierce struggle between code minimization and feature implementation, and cannot afford to ship a feature that only a few users will ever use...

LordFokas commented 7 years ago

I'm closing this. If you still have questions about this topic you can keep replying.