38int main(
int argc,
char * argv[])
46 > cfg{
"GettingStarted", argc, argv};
64 auto busSettings = settings;
70 busSession->connect(cfg.host(), cfg.port());
73 auto bgwCredentialsFuture = busSession->getBgwCredentialsAsync(cfg.userId());
76 bgwCredentials = bgwCredentialsFuture.get();
79 busSession->disconnect();
88 bgwSession->connect(bgwCredentials);
94 bgwSession->send(traderLogonRequest);
103 bgwSession->send(order);
112 bgwSession->send(traderLogoutRequest);
115 bgwSession->disconnect();
118 catch(
const std::exception & ex)
120 std::cerr <<
"\nEXCEPTION: " << ex.what() << std::endl;
#define ONIXS_ICEBOE_NAMESPACE
#define ONIXS_ICEBOE_MESSAGING_NAMESPACE
int main(int argc, char *argv[])
BGW session connection credentials.
static MessageHolder< NewOrderRequest > createOrder(const std::string &traderId)
static MessageHolder< TraderLogoutRequest > createTraderLogoutRequest(const std::string &traderId)
static MessageHolder< TraderLogonRequest > createTraderLogonRequest(const std::string &traderId, const std::string &traderPwd)
std::promise< void > traderLoggedOn
std::pair< std::unique_ptr< GatewayEmulatorThread< BusSessionGatewayListener > >, std::unique_ptr< GatewayEmulatorThread< GatewayListener > > > createEmulator(const SessionSettings &settings, const ConnectivityConfiguration &cfg, bool tcpDirect=false)
SessionSettings fillSettings(const LogonConfiguration &logonCfg, const ConnectivityConfiguration &connCfg, const SettingsConfiguration &settingsCfg)
std::future< T > wait(Stack &stack, std::promise< T > &promise, std::chrono::seconds timeout=std::chrono::seconds{30})
std::unique_ptr< T > makeUnique(Args &&...args)
static void waitUntilKey(const std::string &message)
static void manageSignals() noexcept