2008-11-06, 12:56
I've been trying to build the example_button1 example event client as a preliminary to building a more sophisiticated client. I downloaded example_button1.cpp and xbmcclient.h from http://trac.xbmc.org/browser/branches/li...entClients and compiled it with:
cl -EHsc example_button1.cpp wsock32.lib
(Visual Studio 2005)
I add to add WSAStartip and WSACleanup, and I commented out the #include <sys/socket.h> to make it compile. Once I'd done this it built with no errors.
However when I run the executable it the "HeloPackage.Send" call fails i.e. returns 0. If I modify the line:
CAddress my_addr; // Address => localhost on 9777
to be
CAddress my_addr("192.168.128.128", 9777);
where 192.168.128.128 is my IP address, then HeloPackage.Send and the other .Send calls return 1, so they apparently work, but nothing gets sent. The example is supposed to send keystroke S then keystroke return. However nothing is received in XBMC.
I wrote a simple UDP listener and set it to listen on port 9777, but when I run the example no connection is received, so there's something wrong with the example.
Before I fire up the debugger to try and see what's happening is there anything obvious I've missed?
Also is the eventclient api documented anywhere? I was thinking of knocking up a quick test client in .Net to try and pin down the problem.
Thanks,
John Rennie
cl -EHsc example_button1.cpp wsock32.lib
(Visual Studio 2005)
I add to add WSAStartip and WSACleanup, and I commented out the #include <sys/socket.h> to make it compile. Once I'd done this it built with no errors.
However when I run the executable it the "HeloPackage.Send" call fails i.e. returns 0. If I modify the line:
CAddress my_addr; // Address => localhost on 9777
to be
CAddress my_addr("192.168.128.128", 9777);
where 192.168.128.128 is my IP address, then HeloPackage.Send and the other .Send calls return 1, so they apparently work, but nothing gets sent. The example is supposed to send keystroke S then keystroke return. However nothing is received in XBMC.
I wrote a simple UDP listener and set it to listen on port 9777, but when I run the example no connection is received, so there's something wrong with the example.
Before I fire up the debugger to try and see what's happening is there anything obvious I've missed?
Also is the eventclient api documented anywhere? I was thinking of knocking up a quick test client in .Net to try and pin down the problem.
Thanks,
John Rennie