![]() |
fix8
version 1.4.0
Open Source C++ FIX Framework
|
#include <iostream>#include <memory>#include <fstream>#include <iomanip>#include <sstream>#include <vector>#include <map>#include <list>#include <set>#include <iterator>#include <algorithm>#include <typeinfo>#include <sys/ioctl.h>#include <signal.h>#include <termios.h>#include <errno.h>#include <string.h>#include <fix8/f8includes.hpp>#include <fix8/usage.hpp>#include "Perf_types.hpp"#include "Perf_router.hpp"#include "Perf_classes.hpp"#include "hftest.hpp"Go to the source code of this file.
Namespaces | |
| FIX8 | |
| FIX8::TEX | |
Functions | |
| void | print_usage () |
| const string | GETARGLIST ("hl:svqc:R:S:rb:p:u:o") |
| bool | term_received (false) |
| unsigned | batch_size (1000) |
| unsigned | preload_count (0) |
| unsigned | update_count (5000) |
| bool | quiet (true) |
| void | sig_handler (int sig) |
| int | main (int argc, char **argv) |
This is a complete working example of a HF FIX client/server using FIX8.
Usage: hftest [-RSchlqrsv]
-R,–receive set next expected receive sequence number
-S,–send set next send sequence number
-c,–config xml config (default: hf_client.xml or hf_server.xml)
-h,–help help, this screen
-l,–log global log filename
-q,–quiet do not print fix output
-u,–update update interval for console counters (default 5000)
-r,–reliable start in reliable mode
-s,–server run in server mode (default client mode)
-v,–version print version then exit
To use start the server:
% hftest -sl server
In another terminal session, start the client:
% hftest -l client
Notes
–enable-codectiming hf_client.xml and the client uses hf_server.xml for configuration settings. FIX42.xml Definition in file hftest.cpp.
| unsigned batch_size | ( | 1000 | ) |
Referenced by MyMenu::batch_preload_new_order_single(), main(), and MyMenu::send_all_preloaded().
| const string GETARGLIST | ( | "hl:svqc:R:S:rb:p:u:o" | ) |
Referenced by main(), and print_usage().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 172 of file hftest.cpp.
References batch_size(), FIX8::TEX::ctx(), FIX8_PACKAGE, FIX8_VERSION, GETARGLIST(), RandDev::init(), FIX8::SingleLogger< fn >::log(), next_receive(), next_send(), FIX8::pm_coro, FIX8::pm_pipeline, preload_count(), MyMenu::preload_new_order_single(), FIX8::Session::print, print_usage(), quiet(), FIX8::SingleLogger< fn >::set_global_filename(), sig_handler(), term_received(), update_count(), and FIX8::f8Exception::what().
| unsigned preload_count | ( | 0 | ) |
Referenced by MyMenu::batch_preload_new_order_single(), main(), and MyMenu::preload_new_order_single().
| void print_usage | ( | ) |
Definition at line 557 of file hftest.cpp.
References UsageMan::add(), GETARGLIST(), UsageMan::print(), and UsageMan::setdesc().
Referenced by main().
| bool quiet | ( | true | ) |
Referenced by main().
| void sig_handler | ( | int | sig | ) |
Definition at line 153 of file hftest.cpp.
References term_received().
Referenced by main().
| bool term_received | ( | false | ) |
Referenced by main(), and sig_handler().
| unsigned update_count | ( | 5000 | ) |
Referenced by main(), tex_router_client::operator()(), and MyMenu::send_all_preloaded().