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? -
@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?