Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Stopping an HTTP::Server::Simple server

by Corion (Pope)
on Oct 26, 2007 at 20:49 UTC ( #647492=note: print w/ replies, xml ) Need Help??


in reply to Stopping an HTTP::Server::Simple server

I've done something similar in the time before HTTP::Server::Simple with Test::HTTP::LocalServer.

I use a special URL to tell my server that I'm done with it, normally /quit.

As I launch the server as a child process, I have it output the URL where it can be found, so I get an "always unused port" there.

As an aside, why are you launching a server at all, when you can just require the server module and call the ->handler() or ->handle_request() yourself?


Comment on Re: Stopping an HTTP::Server::Simple server
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://647492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-08-22 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (144 votes), past polls