Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 58ba2a1

Browse files
committed
Refactor Xapi interface
1 parent 3d31d80 commit 58ba2a1

18 files changed

+863
-936
lines changed

examples/GetBalance.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <boost/json.hpp>
66
#include <xapi/Xapi.hpp>
77

8-
boost::asio::awaitable<void> printBalance(xapi::XClientStream &stream)
8+
boost::asio::awaitable<void> printBalance(xapi::XStationClientStream &stream)
99
{
1010
co_await stream.getBalance();
1111
// Use getKeepAlive, to keep the connection alive
@@ -20,8 +20,8 @@ boost::asio::awaitable<void> printBalance(xapi::XClientStream &stream)
2020
counter += 1;
2121
}
2222

23-
co_await stream.stopBalance();
2423
co_await stream.stopKeepAlive();
24+
co_await stream.stopBalance();
2525

2626
co_return;
2727
}

examples/GetCandles.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <boost/json.hpp>
77
#include <xapi/Xapi.hpp>
88

9-
boost::asio::awaitable<void> printCandles(xapi::XClientStream &stream)
9+
boost::asio::awaitable<void> printCandles(xapi::XStationClientStream &stream)
1010
{
1111
co_await stream.getCandles("US100");
1212
// Use getKeepAlive, to keep the connection alive

test/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ enable_testing()
33

44
set( SOURCES
55
TestConnection.cpp
6-
TestSocket.cpp
7-
TestStream.cpp
86
TestXStationClient.cpp
7+
TestXStationClientStream.cpp
98
)
109

1110
add_executable( tests

test/TestSocket.cpp

-295
This file was deleted.

0 commit comments

Comments
 (0)