<commit_before>/*
 *  Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License
 */
/*
 * @file        client-common.cpp
 * @author      <NAME> (<EMAIL>)
 * @author      <NAME> (<EMAIL>)
 * @version     1.0
 * @brief       This file is implementation of client-common functions.
 */

#include <fcntl.h>
#include <poll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>

#include <dpl/errno_string.h>
#include <dpl/log/log.h>
#include <dpl/serialization.h>
#include <dpl/singleton.h>
#include <dpl/singleton_safe_impl.h>

#include <message-buffer.h>

#include <ckm/ckm-error.h>
#include <ckmc/ckmc-type.h>
#include <protocols.h>
#include <client-common.h>

IMPLEMENT_SAFE_SINGLETON(CKM::Log::LogSystem);

namespace {

const int POLL_TIMEOUT = 8000;

void centKeyClientEnableLogSystem(void) {
    CKM::Singleton<CKM::Log::LogSystem>::Instance().SetTag("CKM_CLIENT");
}

} // namespace anonymous

namespace CKM {

SockRAII::SockRAII() : m_sock(-1) {}

SockRAII::~SockRAII()
{
    Disconnect();
}

int SockRAII::Connect(char const * const interface)
{<commit_msg>Modify the setting value of POLL_TIMEOUT<commit_after>/*
 *  Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License
 */
/*
 * @file        client-common.cpp
 * @author      <NAME> (<EMAIL>)
 * @author      <NAME> (<EMAIL>)
 * @version     1.0
 * @brief       This file is implementation of client-common functions.
 */

#include <fcntl.h>
#include <poll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>

#include <dpl/errno_string.h>
#include <dpl/log/log.h>
#include <dpl/serialization.h>
#include <dpl/singleton.h>
#include <dpl/singleton_safe_impl.h>

#include <message-buffer.h>

#include <ckm/ckm-error.h>
#include <ckmc/ckmc-type.h>
#include <protocols.h>
#include <client-common.h>

IMPLEMENT_SAFE_SINGLETON(CKM::Log::LogSystem);

namespace {

const int POLL_TIMEOUT = 600000;

void centKeyClientEnableLogSystem(void) {
    CKM::Singleton<CKM::Log::LogSystem>::Instance().SetTag("CKM_CLIENT");
}

} // namespace anonymous

namespace CKM {

SockRAII::SockRAII() : m_sock(-1) {}

SockRAII::~SockRAII()
{
    Disconnect();
}

int SockRAII::Connect(char const * const interface)
{
{'fraction_non_alphanumeric': 0.12975523444411677, 'fraction_numerical': 0.011795930404010616, 'mean_word_length': 4.017751479289941, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7042019', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1137, 'n_words': 329}