You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
clang format apply
This commit is contained in:
@ -25,33 +25,29 @@
|
||||
|
||||
namespace idbdatafile
|
||||
{
|
||||
|
||||
/* This should be renamed; it's more than a pool, it also does the low-level communication. TBD. */
|
||||
class SocketPool : public boost::noncopyable
|
||||
{
|
||||
public:
|
||||
SocketPool();
|
||||
|
||||
// the dtor will immediately close all sockets
|
||||
virtual ~SocketPool();
|
||||
|
||||
// 0 = success, -1 = failure. Should this throw instead?
|
||||
int send_recv(messageqcpp::ByteStream &to_send, messageqcpp::ByteStream *to_recv);
|
||||
public:
|
||||
SocketPool();
|
||||
|
||||
private:
|
||||
int getSocket();
|
||||
void returnSocket(const int sock);
|
||||
void remoteClosed(const int sock);
|
||||
|
||||
std::vector<int> allSockets;
|
||||
std::deque<int> freeSockets;
|
||||
boost::mutex mutex;
|
||||
boost::condition_variable socketAvailable;
|
||||
uint maxSockets;
|
||||
static const uint defaultSockets = 20;
|
||||
// the dtor will immediately close all sockets
|
||||
virtual ~SocketPool();
|
||||
|
||||
// 0 = success, -1 = failure. Should this throw instead?
|
||||
int send_recv(messageqcpp::ByteStream& to_send, messageqcpp::ByteStream* to_recv);
|
||||
|
||||
private:
|
||||
int getSocket();
|
||||
void returnSocket(const int sock);
|
||||
void remoteClosed(const int sock);
|
||||
|
||||
std::vector<int> allSockets;
|
||||
std::deque<int> freeSockets;
|
||||
boost::mutex mutex;
|
||||
boost::condition_variable socketAvailable;
|
||||
uint maxSockets;
|
||||
static const uint defaultSockets = 20;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace idbdatafile
|
||||
|
Reference in New Issue
Block a user