IoTeX client
connection.h
1#ifndef CONNECTION_H
2#define CONNECTION_H
3
4#include "api/abstract.h"
5#include "api/api.h"
6#include "host/host.h"
7#include "http/http.h"
8
9namespace iotex
10{
11template<typename TAPI>
13{
14 public:
15 TAPI api;
16 Host host;
17
18 Connection() = default;
19 explicit Connection(const TAPI& other) : api(other)
20 {
21 }
22
23 Connection(const char* newIP, int newPort, const char* baseUrl = nullptr)
24 {
25 this->host.set(newIP, newPort, baseUrl);
26 this->api.setHost(newIP, newPort, baseUrl);
27 };
28};
29
30} // namespace iotex
31
32#endif
Definition: connection.h:13
Definition: host.h:17
Definition: abi.h:12