add remote address to command log messages

This commit is contained in:
Martin Michelsen
2024-04-21 15:19:16 -07:00
parent 245df782b9
commit d08aaef0f8
17 changed files with 266 additions and 168 deletions
+3 -2
View File
@@ -13,7 +13,7 @@ struct Channel {
std::unique_ptr<struct bufferevent, void (*)(struct bufferevent*)> bev;
struct sockaddr_storage local_addr;
struct sockaddr_storage remote_addr;
bool is_virtual_connection;
uint64_t virtual_network_id; // 0 = normal TCP connection
Version version;
uint8_t language;
@@ -50,6 +50,7 @@ struct Channel {
// Creates a connected channel
Channel(
struct bufferevent* bev,
uint64_t virtual_network_id,
Version version,
uint8_t language,
on_command_received_t on_command_received,
@@ -70,7 +71,7 @@ struct Channel {
void* context_obj,
const std::string& name = "");
void set_bufferevent(struct bufferevent* bev);
void set_bufferevent(struct bufferevent* bev, uint64_t virtual_network_id);
inline bool connected() const {
return this->bev.get() != nullptr;