Closed deepesh-agarwal closed 11 years ago
You will need to clone and modify siriproxy code to add this functionality yourself, since it is something not really appropriate for inclusion into the master repo.
I figured that out but not where, can you pls. point me which file to look which invokes the function when data is intercepted.
I wonder if changing the priority of ruby/siriproxy over your other processes would alleviate the problem. Seems like it would be more robust and installation independent.
Seems like if you run siriproxy as a daemon, you can specify the process priority.
http://man.he.net/man8/start-stop-daemon
And/Or lower the priority of your high utilization process.
You are misunderstanding this for my another thread, this one asks about where to look for the siriproxy code which sends speech packets to Apple server so I can disable other network hogging downloads for proper connection with Apple text-recognition server.
No I wasn't. I'm suggesting you alter the priory of the ruby and your download process and let Linux allocate the resources appropriately.
try prefixing your manual siriproxy command with nice
, e.g.
nice -n -20 siriproxy server
nice
only works for CPU not network, see this - http://www.slashroot.in/nice-and-renice-command-usage-examples-process-priority-linux
good to know. the only other suggestion I can offer to try increasing the log level to determine where in the code to do what every it is you want need to, e.g.
siriproxy server -l 5
While researching this I found linux tc
(http://www.cyberciti.biz/faq/linux-traffic-shaping-using-tc-to-control-http-traffic/) command which does equivalent to nice
for traffic shaping. It's damn hard with very limited help available, I will still give it a try. Can you pls. tell what port and protocol (http/udp/https) SiriProxy uses to communicate with Apple servers ?
Https port 443
E
On Jul 21, 2013, at 2:05, deepesh-agarwal notifications@github.com wrote:
While researching this I found linux tc (http://www.cyberciti.biz/faq/linux-traffic-shaping-using-tc-to-control-http-traffic/) command which does equivalent to nice for traffic shaping. It's damn hard with very limited help available, I will still give it a try. Can you pls. tell what port and protocol (http/udp/https) SiriProxy uses to communicate with Apple servers ?
— Reply to this email directly or view it on GitHub.
I studied all the example plugins and many more available on the internet but could not find a way to make Siriproxy execute a command before sending the request to Apple server. I am using Siriproxy on my Rpi which acts as an 24/7 download server and I need to pause any downloads before sending/receiving data from Apple server as otherwise they fail to execute because of low available bandwidth. I would like to tap into the core Siriproxy functionality where it intercepts the connection and issue command which pauses the download before proceeding further.