mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
36 lines
655 B
C++
36 lines
655 B
C++
// Copyright 2021, Roman Gershman. All rights reserved.
|
|
// See LICENSE for licensing terms.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "server/reply_builder.h"
|
|
#include "server/common_types.h"
|
|
|
|
namespace dfly {
|
|
|
|
class Connection;
|
|
class EngineShardSet;
|
|
class CommandId;
|
|
|
|
class ConnectionContext : public ReplyBuilder {
|
|
public:
|
|
ConnectionContext(::io::Sink* stream, Connection* owner);
|
|
|
|
// TODO: to introduce proper accessors.
|
|
const CommandId* cid = nullptr;
|
|
EngineShardSet* shard_set = nullptr;
|
|
|
|
Connection* owner() {
|
|
return owner_;
|
|
}
|
|
|
|
Protocol protocol() const;
|
|
|
|
ConnectionState conn_state;
|
|
|
|
private:
|
|
Connection* owner_;
|
|
};
|
|
|
|
} // namespace dfly
|