httpd.sh | A trivial web server in bash | HTTP library
kandi X-RAY | httpd.sh Summary
kandi X-RAY | httpd.sh Summary
Httpd.sh is a dumb web server written in Bash. It uses the [ctypes.sh plugin] to access C socket and file APIs. It uses a single-threaded event loop model. It can serve small files. It does limited error-checking and should not be used in the wild.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of httpd.sh
httpd.sh Key Features
httpd.sh Examples and Code Snippets
Community Discussions
Trending Discussions on httpd.sh
QUESTION
I'm starting a HTTPServer
object in a new thread:
ANSWER
Answered 2020-Dec-21 at 07:54Sure thing. There's a callback called service_actions
which is called after every iteration of the serve_forever
loop, and you can use a threading.Event()
in there you can wait on.
Since the callback is called after each possibly serviced request, it will cause an initial delay of up to 0.5 seconds (by default), but I don't think that's a problem. If it is, you can override serve_forever
to do it before the first request service.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install httpd.sh
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page