Removed obsolete file.
This commit is contained in:
1 parent
8390f87352
commit
c07bf453e9
1 file changed
-52
@@ -1,52 +0,0 @@
|
||||
|
||||
#include "lib/api/public/ServiceContext.h"
|
||||
#include "lib/api/services/MarketDataRelay.client.pb.h"
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/config/protos/MarketData.pb.h"
|
||||
#include "lib/config/protos/system.pb.h"
|
||||
#include "lib/os/os.h"
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
#include "lib/md/UserSymbol.h"
|
||||
#include "lib/md/get_symbols.h"
|
||||
#include "lib/utils/bts_export.h"
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <sstream>
|
||||
|
||||
void windows_sucks()
|
||||
{
|
||||
using namespace bts;
|
||||
co2::MDRequest request;
|
||||
std::ostringstream fmt;
|
||||
fmt << config::get<config::System>().host_name() << "(" << os::process_id()
|
||||
<< ")";
|
||||
request.set_host(fmt.str());
|
||||
std::set<md::UserSymbol> system_symbols;
|
||||
get_system_md_symbols(system_symbols);
|
||||
for (const auto &s : system_symbols) {
|
||||
co2::SecurityChannel ch;
|
||||
ch.set_symbol(s.symbol());
|
||||
ch.set_type(s.type());
|
||||
ch.set_exchange(s.exchange());
|
||||
ch.set_flags(0xff);
|
||||
ch.set_time(0);
|
||||
*request.add_channels() = ch;
|
||||
}
|
||||
|
||||
api::ServiceContext ctx;
|
||||
auto relay = ctx.locate<co2::MarketDataRelay>();
|
||||
while (true) {
|
||||
sleep_for(1s);
|
||||
relay.requestmd(request, [](auto const &reply) {
|
||||
if (reply.success())
|
||||
std::cout << "got md\n";
|
||||
else
|
||||
std::cout << "failed to get md\n";
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
void BTS_EXPORT test_relay_client() { windows_sucks();}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user