text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>ue.size() < _pParams->getMaxQueued())
{
/// NOTE: the condition below is wrong.
/// Since the thread pool is shared between multiple servers/TCPServerDispatchers,
/// _currentThreads < _pParams->getMaxThreads() will be true when the pool is actually saturated.
/// As a ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// TCPServerParams.cpp
//
// Library: Net
// Package: TCPServer
// Module: TCPServerParams
//
// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/TCPServerParams.h"
namespace Poco {
namespace N... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>urn *this;
}
void WebSocket::shutdown()
{
shutdown(WS_NORMAL_CLOSE);
}
void WebSocket::shutdown(Poco::UInt16 statusCode, const std::string& statusMessage)
{
Poco::Buffer<char> buffer(statusMessage.size() + 2);
Poco::MemoryOutputStream ostr(buffer.begin(), buffer.size());
Poco::BinaryWriter writer(... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// WebSocketImpl.cpp
//
// Librar<|fim_suffix|>ER_LENGTH);
Poco::MemoryOutputStream ostr(frame.begin(), frame.size());
Poco::BinaryWriter writer(ostr, Poco::BinaryWriter::NETWORK_BYTE_ORDER);
if (flags == 0) flags = WebSocket::FRAME_BINARY;
flags &= 0xff;
writer << static_cast<Poco::UInt8>(flags)... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// AcceptCertificateHandler.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: AcceptCertificateHandler
//
// Definition of the AcceptCertificateHandler class.
//
// Copyright (c) 2006-2009, Applied Informatics <|fim_suffix|> {
public:
AcceptCertificateHandler(bool handleErrors... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|> std::string(#PKCLS), new Poco::Net::CertificateHandlerFactoryImpl<PKCLS>());
#endif // NetSSL_CertificateHandlerFactory_INCLUDED
<|fim_prefix|>//
// CertificateHandlerFactory.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: CertificateHandlerFactory
//
// Definition of the CertificateH... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// CertificateHandlerFactoryMgr.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: CertificateHandlerFactoryMgr
//
// Definition of the CertificateHandlerFactoryMgr class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|> /// Path to the file or directory containing the CA/root certificates.
/// Can be empty if the OpenSSL builtin CA certificates
/// are used (see loadDefaultCAs).
VerificationMode verificationMode;
/// Specifies whether and how peer certificates are val... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// HTTPSClientSession.h
//
// Library: NetSSL_OpenSSL
// Package: HTTPSClient
// Module: HTTPSClientSession
//
// Definition of the HTTPSClientSession class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// HTTPSSessionInstantiator.h
//
// Library: NetSSL_OpenSSL
// Package: HTTPSClient
// Module: HTTPSSessionInstantiator
//
// Definition of the HTTPSSessionInstantiator class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifi... | fim | ClickHouse/ClickHouse | c |
//
// HTTPSStreamFactory.h
//
// Library: NetSSL_OpenSSL
// Package: HTTPSClient
// Module: HTTPSStreamFactory
//
// Definition of the HTTPSStreamFactory class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NetSSL_... | fim | ClickHouse/ClickHouse | c |
//
// InvalidCertificateHandler.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: InvalidCertificateHandler
//
// Definition of the InvalidCertificateHandler class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>ler class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NetSSL_KeyConsoleHandler_INCLUDED
#define NetSSL_KeyConsoleHandler_INCLUDED
#include "Poco/Net/NetSSL.h"
#include "Poco/Net/PrivateKeyPassphra... | fim | ClickHouse/ClickHouse | c |
//
// KeyFileHandler.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: KeyFileHandler
//
// Definition of the KeyFileHandler class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NetSSL_KeyFileHandler_I... | fim | ClickHouse/ClickHouse | c |
//
// NetSSL.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: OpenSSL
//
// Basic definitions for the Poco OpenSSL library.
// This file must be the first file included by every other OpenSSL
// header file.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// PrivateKeyFactory.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: PrivateKeyFactory
//
// Definition of the PrivateKeyFactory class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef ... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>of the pointer.
/// If a factory with the same name already exists, an exception is thrown.
bool hasFactory(const std::string & name) const;
/// Returns true if for the given name a factory is already registered
const PrivateKeyFactory * getFactory(const std::string & nam... | fim | ClickHouse/ClickHouse | c |
//
// PrivateKeyPassphraseHandler.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: PrivateKeyPassphraseHandler
//
// Definition of the PrivateKeyPassphraseHandler class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>ificate(const void * pSender, VerificationErrorArgs & errorCert);
};
}
} // namespace Poco::Net
#endif // NetSSL_RejectCertificateHandler_INCLUDED
<|fim_prefix|>//
// RejectCertificateHandler.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: RejectCertificateHandler
//
// Definition ... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// SSLException.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: SSLException
//
// Definition of the SSLException class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NetSSL_SSLExcep... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// SSLManager.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: SSLManager
//
// Definition of the SSLManager class.
//
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NetSSL_SSLManager_INC... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// SecureServerSocket.h
//
// Library: NetSSL_OpenSSL
// Package: SSLSockets
// Module: SecureServerSocket
//
// Definition of the SecureServerSocket class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#i... | fim | ClickHouse/ClickHouse | c |
//
// SecureServerSocketImpl.h
//
// Library: NetSSL_OpenSSL
// Package: SSLSockets
// Module: SecureServerSocketImpl
//
// Definition of the SecureServerSocketImpl class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifn... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// SecureSocketImpl.h
//
// Library: NetSSL_OpenSSL
// Package: SSLSockets
// Module: SecureSocketImpl
//
// Definition of the SecureSocketImpl class.
//
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef ... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>en host name.
///
/// Should only be used for non-blocking connections, after the
/// initial SSL handshake has been performed (see completeHandshake()).
int completeHandshake();
/// Completes the SSL handshake.
///
/// If the SSL connection was the... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// SecureStreamSocketImpl.h
//
// Library: NetSSL_OpenSSL
// Package: SSLSockets
// Module: SecureStreamSocketImpl
//
// Definition of the SecureStreamSocketImpl class.
//
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-<|fim_suffix|>y.
... | fim | ClickHouse/ClickHouse | c |
//
// Session.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: Session
//
// Definition of the Session class.
//
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NetSSL_Session_INCLUDED
#define NetSSL_Session_IN... | fim | ClickHouse/ClickHouse | c |
//
// Utility.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: Utility
//
// Definition of the Utility class.
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NetSSL_Utility_INCLUDED
#define NetSSL_Utili... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// VerificationErrorArgs.h
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: V<|fim_suffix|>tIgnoreError(bool ignoreError)
{
_ignoreError = ignoreError;
}
inline bool VerificationErrorArgs::getIgnoreError() const
{
return _ignoreError;
}
}
} // namesp... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>void*, VerificationErrorArgs& errorCert)
{
errorCert.setIgnoreError(true);
}
} } // namespace Poco::Net
<|fim_prefix|>//
// AcceptCertificateHandler.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: AcceptCertificateHandler
//
// Copyright (c) 2006-2009, Applied Informatics Software Eng... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ficateHandlerFactory::~CertificateHandlerFactory()
{
}
CertificateHandlerFactoryRegistrar::CertificateHandlerFactoryRegistrar(const std::string& name, CertificateHandlerFactory* pFactory)
{
SSLManager::instance().certificateHandlerFactoryMgr().setFactory(name, pFactory);
}
CertificateHandlerFactoryRe... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// CertificateHandlerFactoryMgr.cpp
//
// Library: NetSSL_Open<|fim_suffix|>
// Module: CertificateHandlerFactoryMgr
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/CertificateHandlerFacto... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Context.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: Context
//
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/Context.h"
#include "Poco/Net/SSLManager.h"
#include "Po... | fim | ClickHouse/ClickHouse | cpp |
//
// HTTPSClientSession.cpp
//
// Library: NetSSL_OpenSSL
// Package: HTTPSClient
// Module: HTTPSClientSession
//
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/HTTPSClientSession.h"
#include "Poco/Net/HTT... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>TPSSessionInstantiator::registerInstantiator()
{
HTTPSessionFactory::defaultFactory().registerProtocol("https", new HTTPSSessionInstantiator);
}
void HTTPSSessionInstantiator::registerInstantiator(Context::Ptr context)
{
HTTPSessionFactory::defaultFactory().registerProtocol("https", new HTTPSSessionIn... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// HTTPSStreamFactory.cpp
//
// Library: NetSSL_OpenSSL
// Package: HTTPSClient
// Module: HTTPSStreamFactory
//
// Copyright (c) 2006-2012, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/HTTPSStreamFactory.h"
#include... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// InvalidCertificateHandler.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: InvalidCertificateHandler
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/InvalidCertificateHa... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// KeyConsoleHandler.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: KeyConsoleHandler
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/KeyConsoleHandler.h"
#include <iostr... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// KeyFileHandler.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: KeyFileHandler
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/KeyFileHandler.h"
#include "Poco/Net/SSLMa... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>e "Poco/Net/PrivateKeyFactory.h"
#include "Poco/Net/SSLManager.h"
namespace Poco {
namespace Net {
PrivateKeyFactory::PrivateKeyFactory()
{
}
PrivateKeyFactory::~PrivateKeyFactory()
{
}
PrivateKeyFactoryRegistrar::PrivateKeyFactoryRegistrar(const std::string& name, PrivateKeyFactory* pFactory)
{
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>rn it->second;
else
return 0;
}
void PrivateKeyFactoryMgr::removeFactory(const std::string& name)
{
_factories.erase(name);
}
} } // namespace Poco::Net
<|fim_prefix|>//
// PrivateKeyFactoryMgr.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: PrivateKeyFactoryMgr
//
// Copyright (... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>yRequested);
}
catch (...)
{
poco_unexpected();
}
}
} } // namespace Poco::Net
<|fim_prefix|>//
// PrivateKeyPassphraseHandler.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: PrivateKeyPassphraseHandler
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// RejectCertificateHandler.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: RejectCertificateHandler
//
// Copyrigh<|fim_suffix|>*, VerificationErrorArgs& errorCert)
{
errorCert.setIgnoreError(false);
}
} } // namespace Poco::Net
<|fim_middle|>t (c) 2006-2009, Applied Informatics S... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SSLException.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: SSLException
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/SSLException.h"
#include <typeinfo>
namespac... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SSLManager.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: SSLManager
//
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/SSLManager.h"
#include "Poco/Net/Context.h"
#inclu... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>cureServerSocketImpl.h"
#include "Poco/Net/SecureStreamSocket.h"
#include "Poco/Net/SSLManager.h"
#include "Poco/Exception.h"
using Poco::InvalidArgumentException;
namespace Poco {
namespace Net {
SecureServerSocket::SecureServerSocket():
ServerSocket(new SecureServerSocketImpl(SSLManager::instanc... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>, bool reusePort)
{
_impl.bind(address, reuseAddress, reusePort);
reset(_impl.sockfd());
}
void SecureServerSocketImpl::listen(int backlog)
{
_impl.listen(backlog);
reset(_impl.sockfd());
}
void SecureServerSocketImpl::close()
{
reset();
_impl.close();
}
int SecureServerSocketImpl::sendByte... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>rc);
if (rc == 0) throw SSLConnectionUnexpectedlyClosedException();
if (rc < 0 && _pSocket->getBlocking())
throw Poco::TimeoutException("SSL_write timed out");
}
_pSocket->useSendThrottlerBudget(rc);
return rc;
}
int SecureSocketImpl::receiveBytes(void* buffer, int length, int flags)
{
std:... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SecureStreamSocket.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLSockets
// Module: SecureStreamSocket
//
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/SecureStreamSocket.h"
#include ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>SocketImpl::acceptConnection(SocketAddress& clientAddr)
{
throw Poco::InvalidAccessException("Cannot acceptConnection() on a SecureStreamSocketImpl");
}
void SecureStreamSocketImpl::acceptSSL()
{
_impl.acceptSSL();
}
void SecureStreamSocketImpl::connect(const SocketAddress& address)
{
_impl.connect... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ession);
}
} } // namespace Poco::Net
<|fim_prefix|>//
// Session.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Modul<|fim_middle|>e: Session
//
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#if defined(... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Utility.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
// Module: Utility
//
// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/Utility.h"
#include "Poco/String.h"
#include "Poco/Util/... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> const std::string& errMsg):
_errorDepth(errDepth),
_errorNumber(errNum),
_errorMessage(errMsg),
_ignoreError(false)
{
}
VerificationErrorArgs::~VerificationErrorArgs()
{
}
} } // namespace Poco::Net
<|fim_prefix|>//
// VerificationErrorArgs.cpp
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
//... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>it)
{
result << (*it)->toString();
}
}
return result.str();
}
static void read(RedisInputStream & input, Array & value)
{
value.clear();
Int64 length = NumberParser::parse64(input.... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// AsyncReader.h
//
// Library: Redis
// Package: Redis
// Module: AsyncReader
//
// Definition of the AsyncReader class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Redis_AsyncReader_INCLUDED
#define... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Client.h
//
// Library: Redis
// Package: Redis
// Module: Client
//
// Definition of the Client class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Redis_Client_INCLUDED
#define Redis_Client_INCLUD... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|> static Command rpop(const std::string & list);
/// Creates and returns a RPOP command.
static Command rpoplpush(const std::string & sourceList, const std::string & destinationList);
/// Creates and returns a RPOPLPUSH command.
static Command rpush(const std::string &... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>ue.getMessage() + LineEnding::NEWLINE_CRLF; }
static void read(RedisInputStream & input, Error & value) { value.setMessage(input.getline()); }
};
}
} // namespace Poco::Redis
#endif // Redis_Error_INCLUDED
<|fim_prefix|>//
// Error.h
//
// Library: Redis
// Package: Redis
// Module: Erro... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>o
{
namespace Redis
{
POCO_DECLARE_EXCEPTION(Redis_API, RedisException, Exception)
}
} // namespace Poco::Redis
#endif // Redis_Exception_INCLUDED
<|fim_prefix|>//
// Exception.h
//
// Library: Redis
// Package: Redis
// Module: Exception
//
// Definition of the Exception class.
//
// Copyright... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// PoolableConnecti<|fim_suffix|>_pool.borrowObject(timeoutMilliseconds);
#else
_client = _pool.borrowObject();
#endif
}
virtual ~PooledConnection()
{
try
{
_pool.returnObject(_client);
}
catch (...)
... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>LUDED
<|fim_prefix|>//
// Redis.h
//
// Library: Redis
// Package: Redis
// Module: Redis
//
// Basic definitions for the Poco Redis library.
// This file must be the first file included by every other Redis
// header file.
//
// Copyright (c) 2015, <|fim_middle|>Applied Informatics Software Engineering ... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>nline bool RedisEventArgs::isStopped() const
{
return _stop;
}
inline void RedisEventArgs::stop()
{
_stop = true;
}
}
} // namespace Poco::Redis
#endif // Redis_RedisEventArgs_INCLUDED
<|fim_prefix|>//
// RedisEventArgs.h
//
// Library: Redis
// Package: Redis
// ... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// RedisStream.h
//
// Library: Redis
// Package: Redis
// Module: RedisStream
//
// Definition of the RedisStream class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Redis_RedisStream_INCLUDED
#define... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|> /// Converts the value to a RESP (REdis Serialization Protocol) string.
static RedisType::Ptr createRedisType(char marker);
/// Create a Redis type based on the marker:
///
/// - '+': a simple string (std::string)
/// - '-': an error (Error)
/// ... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>ents.value().size()) throw InvalidArgumentException();
RedisType::Ptr element = _elements.value().at(pos);
return element->type();
}
std::string Array::toString() const
{
return RedisTypeTraits<Array>::toString(*this);
}
} } // namespace Poco::Redis
<|fim_prefix|>//
// Array.h
//
// L<|fim_middle|... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ped())
{
try
{
RedisType::Ptr reply = _client.readReply();
RedisEventArgs args(reply);
redisResponse.notify(this, args);
if ( args.isStopped() ) stop();
}
catch (Exception& e)
{
RedisEventArgs args(&e);
redisException.notify(this, args);
stop();
}
if (!_activity.isSto... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>readReply()
{
poco_assert(_input);
int c = _input->get();
if (c == -1)
{
disconnect();
throw RedisException("Lost connection to Redis server");
}
RedisType::Ptr result = RedisType::createRedisType(c);
if (result.isNull())
{
throw RedisException("Invalid Redis type returned");
}
result->r... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>, const std::string& destination, const std::string& member)
{
Command cmd("SMOVE");
cmd << source << destination << member;
return cmd;
}
Command Command::spop(const std::string& set, Int64 count)
{
Command cmd("SPOP");
cmd << set;
if( count != 0 ) cmd << NumberFormatter::format(count);
ret... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> Redis {
Error::Error()
{
}
Error::Error(const std::string& message): _message(message)
{
}
Error::~Error()
{
}
} } // namespace Poco::Redis
<|fim_prefix|>//
// Error.cpp
//
// Library: Redis
// Package: Redis
// Module: Error
//
// Implementation of the Error <|fim_middle|>class.
//
// Copyright... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Exception.h
//
// Library: Redis
// Package: Redis
// Module: Exception
//
// Implementation of the Exception class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Redis/Exception.h"
namespac... | fim | ClickHouse/ClickHouse | cpp |
//
// RedisEventArgs.cpp
//
// Library: Redis
// Package: Redis
// Module: RedisEventArgs
//
// Implementation of the RedisEventArgs class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Redis/RedisEventArgs.h"
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>eam(Net::StreamSocket& redis):
RedisIOS(redis),
std::ostream(&_buf)
{
poco_ios_init(&_buf);
}
RedisOutputStream::~RedisOutputStream()
{
}
RedisInputStream::RedisInputStream(Net::StreamSocket& redis):
RedisIOS(redis),
std::istream(&_buf)
{
poco_ios_init(&_buf);
}
//
// RedisInputStream
//
Red... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Type.h
//
// Library: Redis
// Package: Redis
// Module: Type
//
// Implementation of the Type class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Redis/Type.h"
#include "Poco/Redis/Error.h"
... | fim | ClickHouse/ClickHouse | cpp |
//
// AbstractConfiguration.h
//
// Library: Util
// Package: Configuration
// Module: AbstractConfiguration
//
// Definition of the AbstractConfiguration class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_A... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>// connected to a ConsoleChannel.
///
/// After the logging subsystem has been initialized, which
/// usually happens as the first action in Application::initialize(),
/// the application's logger is the one specified by the
/// "application.logger" configuration pr... | fim | ClickHouse/ClickHouse | c |
//
// ConfigurationView.h
//
// Library: Util
// Package: Configuration
// Module: ConfigurationView
//
// Definition of the ConfigurationView class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_Configuration... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// FilesystemConfiguration.h
//
// Library: Util
// Package: Configuration
// Module: FilesystemConfiguration
//
// Definition of the FilesystemConfiguration class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// HelpFormatter.h
//
// Library: Util
// Package: Options
// Module: HelpFormatter
//
// Definition of the HelpFormatter class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_HelpFormatter_INC... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// IniFileConfiguration.h
//
// Library: Util
// Package: Configuration
// Module: IniFileConfiguration
//
// Definition of the IniFileConfiguration class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#if... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>CLUDED
#define Util_IntValidator_INCLUDED
#include "Poco/Util/Util.h"
#include "Poco/Util/Validator.h"
namespace Poco
{
namespace Util
{
class Util_API IntValidator : public Validator
/// The IntValidator tests whether the option argument,
/// which must be an integer, lies within a give... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// JSONConfiguration.h
//
// Library: Util
// Package: Util
// Module: JSONConfiguration
//
// Definition of the JSONConfiguration class.
//
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_JSONConfigura... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>/// of the given configuration.
void removeConfiguration(AbstractConfiguration * pConfig);
/// Removes the given configuration from the LayeredConfiguration.
///
/// Does nothing if the given configuration is not part of the
/// LayeredConfiguration.
void ... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>used to access
/// the logger at runtime.
/// Every logger except the root logger has a mandatory "name" property which
/// is used to specify the logger's full name.
/// Furthermore, a "channel" property is supported, which can either refer
/// to a named channel, or which can contain... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>on's logger to
/// the logger specified by the "application.logger"
/// property, or to "Application" if the property
/// is not specified.
{
public:
LoggingSubsystem();
const char * name() const;
protected:
void initialize(Application & self);
void... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// MapConfiguration.h
//
// Library: Util
// Package: Configuration
// Module: MapConfiguration
//
// Definition of the MapConfiguration class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_Ma... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Option.h
//
// Library: Util
// Package: Options
// Module: Option
//
// Definition of the Option class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_Option_INCLUDED
#define Util_Option_IN... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>s class.
{
public:
typedef void (C::*Callback)(const std::string & name, const std::string & value);
OptionCallback(C * pObject, Callback method) : _pObject(pObject), _method(method)
/// Creates the OptionCallback for the given object and member function.
{
... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// OptionException.h
//
// Library: Util
// Package: Options
// Module: OptionException
//
// Definition of the OptionException class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_OptionExcep... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>yle;
bool _ignore;
std::set<std::string> _groups;
std::set<std::string> _specifiedOptions;
std::string _deferredOption;
};
//
// inlines
//
inline bool OptionProcessor::isUnixStyle() const
{
return _unixStyle;
}
}
} // namespace Poco:... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// OptionSet.h
//
// Library: Util
// Package: Options
// Module: OptionSet
//
// Definition of the OptionSet class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_OptionSet_INCLUDED
#define Ut... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>owing escape sequences:
/// - \t: tab (0x09)
/// - \n: line feed (0x0a)
/// - \r: carriage return (0x0d)
/// - \f: form feed (0x0c)
///
/// For every other sequence that starts with a backslash, the backslash is removed.
/// Therefore, the sequence \a would just yield a... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|> std::string _regexp;
};
}
} // namespace Poco::Util
#endif // Util_RegExpValidator_INCLUDED
<|fim_prefix|>//
// RegExpValidator.h
//
// Library: Util
// Package: Options
// Module: RegExpValidator
//
// Definition of the RegExpValidator class.
//
// Copyright (c) 2006, Applied Informatics Soft... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|> } \
}
#endif // Util_ServerApplication_INCLUDED
<|fim_prefix|>//
// ServerApplication.h
//
// Library: Util
// Package: Application
// Module: ServerApplication
//
// Definition of the ServerApplication class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering G... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Subsystem.h
//
// Library: Util
// Package: Application
// Module: Subsystem
//
// Definition of the Subsystem class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_Subsystem_INCLUDED
#defin... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// SystemConfiguration.h
//
// Library: Util
// Package: Configuration
// Module: SystemConfiguration
//
// Definition of the SystemConfiguration class.
//
// Copyright (c) 2004-2006, A<|fim_suffix|>tring & key, std::string & value) const;
void setRaw(const std::string & key, const std::string... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>conds in the future at the point
/// schedule() is called, the task will be executed 10
/// seconds later, even if the system time changes in
/// between.
void schedule(TimerTask::Ptr pTask, Poco::Clock clock);
/// Schedules a task for execution at the specified ti... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>last execution of the timer task.
///
/// Returns 0 if the timer has never been executed.
protected:
~TimerTask();
/// Destroys the TimerTask.
private:
TimerTask(const TimerTask &);
TimerTask & operator=(const TimerTask &);
Poco::Timestamp... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// TimerTaskAdapter.h
//
// Library: Util
// Package: Timer
// Module: TimerTaskAdapter
//
// Definition of the TimerTaskAdapter class template.
//
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Util_TimerT... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>oid appendUnit(std::ostream & os) const = 0;
};
template <typename U>
struct Holder : public Placeholder
{
typedef Value<typename U::ValueType, typename U::Unit> ValueType;
Holder(const U & val) : _va... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>y any other project whose source files include this file see
// Util_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
//
#if !defined(Util_API)
# if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined(__GNUC__) && (__GNUC__ >= 4)
# ... | fim | ClickHouse/ClickHouse | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.