SPARK-1669 1/2 - send login token with market data query
This commit is contained in:
1 parent
490ad06cf5
commit
c09485affc
10 files changed
+68
-25
No files matched your search
@@ -210,9 +210,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void set_token(const std::string& token) {
|
||||
_request.set_token(token);
|
||||
}
|
||||
|
||||
std::string compact_log_format() const {
|
||||
ostringstream log;
|
||||
log << "{";
|
||||
log << std::endl << "token: " << _request.token();
|
||||
for (const auto& ch : _request.channels()) {
|
||||
log << std::endl;
|
||||
log << ch.symbol() << " ";
|
||||
@@ -415,6 +420,12 @@ void add_relay_symbol(RelayControl* relay, const SecurityChannel& chan) {
|
||||
relay->client.add_symbol(chan);
|
||||
});
|
||||
}
|
||||
void set_relay_token(RelayControl* relay, const std::string& token) {
|
||||
bts_assert(relay);
|
||||
relay->context.post([=]() {
|
||||
relay->client.set_token(token);
|
||||
});
|
||||
}
|
||||
|
||||
utils::Dispatcher& scan_securities_thread() {
|
||||
return utils::Dispatcher::background();
|
||||
|
||||
Reference in new issue
Block a user