SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ChatClient_client.hpp
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #ifndef MPRPC_ChatClient_client_6fd354dd_HPP__
9 #define MPRPC_ChatClient_client_6fd354dd_HPP__
10 
11 #include "ChatClient.hpp"
12 
13 namespace StickWorld {
14 
15 namespace ChatClient {
16 
17 
18 class client : public msgpack::rpc::client::base {
19 public:
20  client(const msgpack::rpc::address& addr, msgpack::rpc::loop lo = msgpack::rpc::loop()) :
21  msgpack::rpc::client::base(addr, lo) { }
22 
23  client(const std::string& host, uint16_t port, msgpack::rpc::loop lo = msgpack::rpc::loop()) :
24  msgpack::rpc::client::base(host, port, lo) { }
25 
26  ~client() { }
27 
29  const ChatClient::notify& message) {
30  instance.call_apply("notify", message).get<void>();
31  }
32 
33  void notify(
34  const ChatMessage& x) {
35  ChatClient::notify _Message;
36  _Message.x = x;
37  return notify_apply(_Message);
38  }
39 
40  msgpack::rpc::future::type<void> notify_async_apply(
41  const ChatClient::notify& message) {
42  return instance.call_apply("notify", message);
43  }
44 
45  msgpack::rpc::future::type<void> notify_async(
46  const ChatMessage& x) {
47  ChatClient::notify _Message;
48  _Message.x = x;
49  return notify_async_apply(_Message);
50  }
51 };
52 
53 
54 } // namespace ChatClient
55 
56 
57 } // namespace StickWorld
58 #endif
Definition: ChatClient_client.hpp:18
msgpack::rpc::future::type< void > notify_async_apply(const ChatClient::notify &message)
Definition: ChatClient_client.hpp:40
Definition: types.hpp:18
~client()
Definition: ChatClient_client.hpp:26
client(const msgpack::rpc::address &addr, msgpack::rpc::loop lo=msgpack::rpc::loop())
Definition: ChatClient_client.hpp:20
ChatMessage x
Definition: ChatClient.hpp:24
void notify_apply(const ChatClient::notify &message)
Definition: ChatClient_client.hpp:28
msgpack::rpc::future::type< void > notify_async(const ChatMessage &x)
Definition: ChatClient_client.hpp:45
Definition: ChatClient.hpp:18
client(const std::string &host, uint16_t port, msgpack::rpc::loop lo=msgpack::rpc::loop())
Definition: ChatClient_client.hpp:23
void notify(const ChatMessage &x)
Definition: ChatClient_client.hpp:33