The closest I could find is ats_pagespeed.This doesn't poll an external server but it does poll a configuration file. Basically you set up a thread using TSThreadCreate(), have it do the polling, and then communicate its results back via thread safe containers. I think the pagespeed one works by creating a duplicate structure on configuration change, then atomically swapping pointers. You still need to reference count so the old structure can be cleaned up. Thread safe queues would work as well.
On Wednesday, January 20, 2016 5:55 PM, Dk Jack <dnj0...@gmail.com> wrote: Hi, I am new to ATS and I am trying to write a plugin. My plugin needs to do two things: 1) Periodically poll an external server and get some info and cache the info locally. 2) Use this cached info while processing the traffic. I couldn't find a straight forward example to do #1. Could someone more knowledgable point me in the correct direction. Any help is appreciated. Thanks. Dnj