Kodi Community Forum

Full Version: Capturing Notifications
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Have a simple c++ program, which uses curl, which integrates basic control of XBMC within a home automation software. It does navigation and playing of content directly from the controlling system via mounted SMB shares.

I would like to implement receiving notifications from XBMC, specifically when playback started and stopped, I honestly am not sure how to do this within c++.

Can notifications be implemented within c++, either via websockets or tcp?

If not, what is the best option of doing this?

I did google, but my findings did not shed real light, also I am a real novice in c++ (well coding), forgive my silly question if it is.
You need a TCP socket. That should get you started with google.
Thanks that got me some useful information.

Question

I see the recv function waits for input, but unless I have this wrong, it exist when it get something. Do I simple reconnect for multiple receipts or there is a better way.?
I'm sorry, but this forum is not for C/C++/socket programming questions/support. There are more than enough how-tos/tutorials/examples about this on the internet.