+ function rd_data_set($curtime, $stat, $subst, $step, $from)
+ {
+ $this->rd_endtime = $curtime + RD_ENDTIME_DELTA;
+ $this->rd_stat = $stat;
+ $this->rd_subst = $subst;
+ $this->rd_step = $step;
+ $this->rd_from = $from;
+ $this->rd_scristp = 0;
+ $this->rd_kalive = $curtime + RD_KEEPALIVE_TOUT;
+ }
+
+ function rd_socket_get() {
+ return ($this->rd_socket);
+ }
+
+ function rd_socket_set($sock) {
+ $this->rd_socket = $sock;
+ }
+
+ function rd_kalive_get()
+ {
+ return ($this->rd_kalive);
+ }
+
+ function rd_kalive_set($tm)
+ {
+ $this->rd_kalive = $tm;
+ }
+
+ function rd_kalive_is_expired($tm)
+ {
+ // printf("rd_kalive %d tm %d\n", $this->rd_kalive, $tm);
+ return ($this->rd_kalive < $tm);
+ }
+
+ function rd_endtime_is_expired($tm)
+ {
+ // printf("rd_endtime %d tm %d\n", $this->rd_kalive, $tm);
+ return ($this->rd_endtime < $tm);
+ }
+
+ function rd_kalive_reset($tm)
+ {
+ $this->rd_kalive = $tm + RD_KEEPALIVE_TOUT;
+ }
+
+ function rd_cache_get()
+ {
+ return ($this->rd_cache);
+ }
+
+ function rd_cache_set($cache)
+ {
+ $this->rd_cache = $cache;
+ }
+