To reproduce the example do
g++ -pthread websocket_example.cpp -o websocket_example && ./websocket_example
I have added printing in terminal to show what is going on.
If you want to see it notifying on changing account information. Increase the sleep time before unsubscribing and change the public key in onAccountChange. After subscription call solana airdrop 1 to change the data in account. You should recieve an account notification shortly.
To reproduce the example do g++ -pthread websocket_example.cpp -o websocket_example && ./websocket_example I have added printing in terminal to show what is going on. If you want to see it notifying on changing account information. Increase the sleep time before unsubscribing and change the public key in onAccountChange. After subscription call solana airdrop 1 to change the data in account. You should recieve an account notification shortly.