载入中...
搜索中...
未找到
Session.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <string>
6#include <unordered_map>
7
8namespace eve::network {
9
10class Channel;
11
17public:
19 Session() = default;
21 ~Session();
22
24 void add(std::string name, Channel* ch);
26 Channel* get(std::string name);
28 void remove(std::string name);
30 void closeAll();
31
32private:
33 std::unordered_map<std::string, Channel*> channels_;
34};
35
36} // namespace eve::network
#define EVENGINE_API_PLATFORM
Definition Export.h:107
std::string name
Length-prefixed (big-endian uint32) message framing over a TcpSocket. sendMsg() writes one framed mes...
Definition Channel.h:23
Named collection of Channels (a "session"). Lookup by name, close all. Does not own the channels; the...
Definition Session.h:16
Session()=default
Session.