See #250. Adds a wait() wrapper to the HTTP service as well

git-svn-id: file:///home/svn/framework3/trunk@5927 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-11-16 21:00:44 +00:00
parent a7595fce6c
commit 5d0ebc18cf
1 changed files with 10 additions and 1 deletions

View File

@ -127,6 +127,7 @@ class Server
# Listens on the defined port and host and starts monitoring for clients.
#
def start
self.listener = Rex::Socket::TcpServer.create(
'LocalHost' => self.listen_host,
'LocalPort' => self.listen_port,
@ -153,6 +154,14 @@ class Server
self.listener.close
end
#
# Waits for the HTTP service to terminate
#
def wait
self.listener.wait if self.listener
end
#
# Closes the supplied client, if valid.
#
@ -347,4 +356,4 @@ end
end
end
end
end