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