2015-01-27, 02:36
There are few posts about the two firsts so I'm only writing them down for the record:
1. Use socat, it's the easiest and it works great, socat also available at the Unofficial Addons Repo of OpenELEC but only for x86_64.
2. Use openbsd-netcat, thanks for luuthe on the hts channel at freenode, notice the 5s timeout as netcat doesn't exit properly, I'm not sure if it's available at all for OpenELEC.
3. Use curl, unix socket is relatively new feature of curl v7.40, in OpenELEC this version is only in master branch hopefully in next update it will be available, notice the 5s timeout and the fact I had to supplied some url (doesn't matter which).
1. Use socat, it's the easiest and it works great, socat also available at the Unofficial Addons Repo of OpenELEC but only for x86_64.
Code:
cat xmltv.xml | socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock
2. Use openbsd-netcat, thanks for luuthe on the hts channel at freenode, notice the 5s timeout as netcat doesn't exit properly, I'm not sure if it's available at all for OpenELEC.
Code:
cat xmltv.xml | nc -w 5 -U /home/hts/.hts/tvheadend/epggrab/xmltv.sock
3. Use curl, unix socket is relatively new feature of curl v7.40, in OpenELEC this version is only in master branch hopefully in next update it will be available, notice the 5s timeout and the fact I had to supplied some url (doesn't matter which).
Code:
curl -d @xmltv.xml -X POST -m 5 --unix-socket /home/hts/.hts/tvheadend/epggrab/xmltv.sock http://google.com