2013-10-14, 18:52
(2013-10-14, 06:57)juggie Wrote:(2013-10-14, 05:42)juggie Wrote:(2013-10-13, 21:59)Carb0 Wrote: juggie can you post the example code for a http server. It seems we need the http server solution to make live games work on Windows until apok fixed the bug in XBMC.
Hey Carb0,
I sent you a pm with a link to a python project I wrote that uses asyncore as a http server and also included info on how to run that within a python addon.
Let me know if that works for you, you would of course need to strip out the SSL aspect. If its not clear let me know and i'll whip up a short example I just do not have time right now.
Was able to get a quick example working prior to sleeping. There may be some unused vars in there as I stripped code from something else and did this quickly. You already know how to use urllib/httplib so inside handle_request you would parse the requested url and then request that url from neulion using proper agent string. Fix what you want to fix in the response, then call pushok() to return it to the other request.
You would want to change this to listen on localhost only as well.