4#include <unordered_map>
7#ifndef MSGPACK_DEFINE_MAP
8#define MSGPACK_DEFINE_MAP(...)
52 MSGPACK_NVP(
"m", member_id), MSGPACK_NVP(
"l", lib_name),
53 MSGPACK_NVP(
"v", lib_ver), MSGPACK_NVP(
"a", addr))
88 MSGPACK_NVP(
"m", member_id), MSGPACK_NVP(
"h", hostname))
113 std::shared_ptr<std::unordered_map<unsigned int, int>>
status;
142 const std::chrono::system_clock::time_point &time)
143 : member_id(member_id),
144 time(std::chrono::duration_cast<std::chrono::milliseconds>(
145 time.time_since_epoch())
147 Sync() :
Sync(0, std::chrono::system_clock::now()) {}
148 Sync(
const std::chrono::system_clock::time_point &time) :
Sync(0, time) {}
149 std::chrono::system_clock::time_point
getTime()
const {
150 return std::chrono::system_clock::time_point(
151 std::chrono::milliseconds(time));
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition encoding.h:69
#define MSGPACK_DEFINE_MAP(...)
Definition canvas2d.h:10
型からkindを取得するためだけのベースクラス
Definition base.h:53
ping状況のリクエスト (client->server)
Definition sync.h:122
各クライアントのping状況 (server->client)
Definition sync.h:108
std::shared_ptr< std::unordered_map< unsigned int, int > > status
member_id: ping応答時間(ms) のmap
Definition sync.h:113
ping(server->client->server)
Definition sync.h:101
serverのバージョン情報(server->client)
Definition sync.h:64
std::string ver
serverのバージョン
Definition sync.h:76
std::string hostname
サーバーのホスト名
Definition sync.h:86
unsigned int member_id
クライアントのmember id
Definition sync.h:81
std::string svr_name
serverの名前
Definition sync.h:71
client初期化(client->server->client)
Definition sync.h:30
std::string addr
Definition sync.h:49
SharedString member_name
member名
Definition sync.h:35
std::string lib_ver
Definition sync.h:48
std::string lib_name
clientライブラリの名前(id) このライブラリでは"cpp"
Definition sync.h:47
unsigned int member_id
member id (1以上)
Definition sync.h:40
syncの時刻(client->server->client)
Definition sync.h:134
Sync()
Definition sync.h:147
Sync(const std::chrono::system_clock::time_point &time)
Definition sync.h:148
std::uint64_t time
1970/1/1 0:00(utc) からの経過ミリ秒数で表し、閏秒はカウントしない
Definition sync.h:140
Sync(unsigned int member_id, const std::chrono::system_clock::time_point &time)
Definition sync.h:141
std::chrono::system_clock::time_point getTime() const
Definition sync.h:149
unsigned int member_id
member id
Definition sync.h:135
#define WEBCFACE_NS_END
Definition webcface-config.h:104
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:103