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 <fix8/consolemenu.hpp>
#include "Myfix_types.hpp"
#include "Myfix_router.hpp"
#include "Myfix_classes.hpp"
#include "myfix.hpp"
Go to the source code of this file.
Namespaces | |
FIX8 | |
FIX8::TEX | |
Functions | |
void | print_usage () |
const string | GETARGLIST ("hl:svqc:R:S:rp:L:") |
bool | term_received (false) |
bool | quiet (false) |
void | sig_handler (int sig) |
int | main (int argc, char **argv) |
This is a complete working example of a FIX client/server using FIX8.
Usage: harness [-LRSchlpqrsv]
-L,–lines set number of screen lines in the console menu (default 50)
-R,–receive set next expected receive sequence number
-S,–send set next send sequence number
-c,–config xml config (default: myfix_client.xml or myfix_server.xml)
-h,–help help, this screen
-l,–log global log filename
-q,–quiet do not print fix output
-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:
% harness -sl server
In another terminal session, start the client:
% harness -l client
Notes
–enable-msgrecycle
, the example will reuse allocated messages.–enable-customfields
, the example will add custom fieldsmyfix_client.xml
and the client uses myfix_server.xml
for configuration settings.FIX50SP2.xml
and FIXT11.xml
in ./schemaDefinition in file harness.cpp.
const string GETARGLIST | ( | "hl:svqc:R:S:rp:L:" | ) |
Referenced by main(), and print_usage().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 176 of file harness.cpp.
References FIX8::TEX::ctx(), FIX8_PACKAGE, FIX8_VERSION, MyMenu::get_tty(), GETARGLIST(), glout_info, FIX8::hypersleep< h_seconds >(), RandDev::init(), next_receive(), next_send(), print_usage(), quiet(), FIX8::tty_save_state::set_raw_mode(), sig_handler(), term_received(), and FIX8::f8Exception::what().
void print_usage | ( | ) |
Definition at line 379 of file harness.cpp.
References UsageMan::add(), GETARGLIST(), UsageMan::print(), and UsageMan::setdesc().
Referenced by main().
bool quiet | ( | false | ) |
Referenced by main().
void sig_handler | ( | int | sig | ) |
Definition at line 160 of file harness.cpp.
References term_received().
Referenced by main().
bool term_received | ( | false | ) |
Referenced by main(), and sig_handler().