FIX 4.0 Demo 1.0
Loading...
Searching...
No Matches
client.hpp
Go to the documentation of this file.
1
9#pragma once
10
11#include <string>
12#include <memory>
13#include <thread>
14
15namespace fix40 {
16
17class Connection;
18class Session;
19class Reactor;
20class ThreadPool;
21class TimingWheel;
22
46class Client {
47public:
54
61
71 bool connect(const std::string& ip, int port);
72
78 void disconnect();
79
87
88private:
92 void on_connection_close();
93
94 std::unique_ptr<Reactor> reactor_;
95 std::unique_ptr<ThreadPool> worker_pool_;
96 std::unique_ptr<TimingWheel> timing_wheel_;
97
98 std::shared_ptr<Connection> connection_;
99 std::shared_ptr<Session> session_;
100
101 std::thread reactor_thread_;
102};
103
104} // namespace fix40
FIX 协议客户端
Definition client.hpp:46
void disconnect()
断开连接
Client()
构造客户端
bool connect(const std::string &ip, int port)
连接到服务器
~Client()
析构函数
void run_console()
运行控制台交互
Definition matching_engine.hpp:23