diff options
author | Jim Flynn <jim.flynn@arm.com> | 2020-07-20 16:57:44 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-07-29 15:35:15 +0100 |
commit | bbfe603e5ae42317a2b67d713d00882bea341c88 (patch) | |
tree | 8d8a78d6836384fb92fb9741c865443624dfec68 /profiling/server/src/basePipeServer/ConnectionHandler.hpp | |
parent | a9c2ce123a6a5a68728d040a0323c482bbe46903 (diff) | |
download | armnn-bbfe603e5ae42317a2b67d713d00882bea341c88.tar.gz |
IVGCVSW-5166 Pull out the common and server side code into standalone libraries
Change-Id: I180f84c493a9b2be4b93b25d312ebdd9e71b1735
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'profiling/server/src/basePipeServer/ConnectionHandler.hpp')
-rw-r--r-- | profiling/server/src/basePipeServer/ConnectionHandler.hpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/profiling/server/src/basePipeServer/ConnectionHandler.hpp b/profiling/server/src/basePipeServer/ConnectionHandler.hpp deleted file mode 100644 index 661935b885..0000000000 --- a/profiling/server/src/basePipeServer/ConnectionHandler.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright © 2020 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#pragma once - -#include "BasePipeServer.hpp" -#include <string> - -namespace armnnProfiling -{ - -class ConnectionHandler -{ -public: - /// Constructor establishes the Unix domain socket and sets it to listen for connections. - /// @param udsNamespace the namespace (socket address) associated with the listener. - /// @throws SocketConnectionException if the socket has been incorrectly setup. - ConnectionHandler(const std::string& udsNamespace, const bool setNonBlocking); - - ~ConnectionHandler() - { - // We have set SOCK_CLOEXEC on this socket but we'll close it to be good citizens. - armnnUtils::Sockets::Close(m_ListeningSocket); - } - - ConnectionHandler(const ConnectionHandler&) = delete; - ConnectionHandler& operator=(const ConnectionHandler&) = delete; - - ConnectionHandler(ConnectionHandler&&) = delete; - ConnectionHandler& operator=(ConnectionHandler&&) = delete; - - /// Attempt to open a new socket to the client and use it to construct a new basePipeServer - /// @param echoPackets if true the raw packets will be printed to stdout. - /// @return if successful a unique_ptr to a basePipeServer otherwise a nullptr - std::unique_ptr<BasePipeServer> GetNewBasePipeServer(const bool echoPackets); - -private: - - armnnUtils::Sockets::Socket m_ListeningSocket; -}; - -} // namespace armnnProfiling
\ No newline at end of file |