Add running? check to Server

MS-2855/keylogger-mettle-extension
RageLtMan 2016-02-25 04:10:55 -05:00
parent 7b370622c4
commit 3afc5d2da1
1 changed files with 9 additions and 0 deletions

View File

@ -174,6 +174,13 @@ class Server
end end
end end
#
# Check if server is running
#
def running?
@running == true
end
# #
# Start the DNS server and cache # Start the DNS server and cache
# #
@ -190,6 +197,7 @@ class Server
@tcp_sock.start @tcp_sock.start
end end
@cache.start @cache.start
@running = true
end end
# #
@ -203,6 +211,7 @@ class Server
end end
@tcp_sock.stop if @tcp_sock @tcp_sock.stop if @tcp_sock
@cache.stop(flush_cache) @cache.stop(flush_cache)
@running = false
end end
# #