diff options
author | Bobby R. Bruce <bbruce@ucdavis.edu> | 2020-01-03 17:47:35 -0800 |
---|---|---|
committer | Bobby R. Bruce <bbruce@ucdavis.edu> | 2020-01-09 22:02:43 +0000 |
commit | 1986b77d78e30684b1ca5ac9d9b1c75736f258d6 (patch) | |
tree | b800ac176777feb2b544f92c47f6606eb3aa928e /src/base/socket.cc | |
parent | b97111fc2333672741cf578ee15c45ba3924b5cb (diff) | |
download | gem5-1986b77d78e30684b1ca5ac9d9b1c75736f258d6.tar.xz |
tests,base: Added GTest for base/socket.cc
It should be noted that some features of this class have not been fully
tested due to interaction with system-calls.
Change-Id: I8315188327e022ac4c98aa9ce4bd38243266ab17
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23984
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/base/socket.cc')
-rw-r--r-- | src/base/socket.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/base/socket.cc b/src/base/socket.cc index ece4a6ac4..b188ac1f9 100644 --- a/src/base/socket.cc +++ b/src/base/socket.cc @@ -1,4 +1,7 @@ /* + * Copyright (c) 2020 The Regents of the University of California + * All rights reserved + * * Copyright (c) 2002-2005 The Regents of The University of Michigan * All rights reserved. * @@ -26,6 +29,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Authors: Nathan Binkert + * Bobby R. Bruce */ #include "base/socket.hh" @@ -50,6 +54,14 @@ bool ListenSocket::anyListening = false; bool ListenSocket::bindToLoopback = false; void +ListenSocket::cleanup() +{ + listeningDisabled = false; + anyListening = false; + bindToLoopback = false; +} + +void ListenSocket::disableAll() { if (anyListening) |