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.cpp | |
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.cpp')
-rw-r--r-- | profiling/server/src/basePipeServer/ConnectionHandler.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/profiling/server/src/basePipeServer/ConnectionHandler.cpp b/profiling/server/src/basePipeServer/ConnectionHandler.cpp index 1485ab8620..1c9ffa95c2 100644 --- a/profiling/server/src/basePipeServer/ConnectionHandler.cpp +++ b/profiling/server/src/basePipeServer/ConnectionHandler.cpp @@ -1,18 +1,21 @@ // -// Copyright © 2020 Arm Ltd. All rights reserved. +// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // -#include "ConnectionHandler.hpp" -#include <string.h> +#include <server/include/basePipeServer/ConnectionHandler.hpp> -using namespace armnnUtils; +#include <string> -namespace armnnProfiling +namespace arm { + +namespace pipe +{ + ConnectionHandler::ConnectionHandler(const std::string& udsNamespace, const bool setNonBlocking) { - Sockets::Initialize(); + arm::pipe::Initialize(); m_ListeningSocket = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (-1 == m_ListeningSocket) @@ -39,14 +42,13 @@ ConnectionHandler::ConnectionHandler(const std::string& udsNamespace, const bool if (setNonBlocking) { - Sockets::SetNonBlocking(m_ListeningSocket); + arm::pipe::SetNonBlocking(m_ListeningSocket); } } std::unique_ptr<BasePipeServer> ConnectionHandler::GetNewBasePipeServer(const bool echoPackets) { - armnnUtils::Sockets::Socket clientConnection = armnnUtils::Sockets::Accept(m_ListeningSocket, nullptr, nullptr, - SOCK_CLOEXEC); + arm::pipe::Socket clientConnection = arm::pipe::Accept(m_ListeningSocket, nullptr, nullptr, SOCK_CLOEXEC); if (clientConnection < 1) { return nullptr; @@ -54,4 +56,5 @@ std::unique_ptr<BasePipeServer> ConnectionHandler::GetNewBasePipeServer(const bo return std::make_unique<BasePipeServer>(clientConnection, echoPackets); } -} // namespace armnnProfiling
\ No newline at end of file +} // namespace pipe +} // namespace arm |