Solved How to make a stock-market-like app?
-
I want to make an app which could receive data from server once a second automatically when open it. I don't have any ideas to build it. Use RESTful API or something?
Many thanks. -
@Bayesky said in How to make a stock-market-like app?:
app which could receive data from server
Are both the client app and the server things that you can develop?
If so, I can think of 2 approaches maybe:
- use MQTT and the publish/subscribe paradigm -> your client will subscribe to whatever topic(s) you want on start and then it will receive any updates whenever the server publish new data on such topic(s)
- use WebSocket protocol so to have full-duplex communication channels over a single TCP connection
-
@Pablo-J-Rogina
According to your useful advice, I installed Redis on the server and hiredis on my Mac. When I usegcc -o RedisTest RedisTest.c -lhiredis
, it works well.
But when I added this library into Qt ( useLIBS += -L/usr/local/lib/ -lhiredis
), an error occurred which said'hiredis/hiredis.h' file not found
.
How should I do to solve this problem? -
you need to add an
INCLUDEPATH
in your pro file to point to the directory where the includes are found.The
LIBS
line looks already good, but is used by the linker at a later step.Regards
-
@aha_1980 said in How to make a stock-market-like app?:
ectory where the includes are found.
Thank you. I have succeed in connection!