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-b9f4589650daunstable
parent
a7595fce6c
commit
5d0ebc18cf
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue